class staticbo.rules. BrokenRulesResponse
Source: rules/
Represents the HTTP Response format of broken rules. The data property holds the information of broken rules.
If the model property is a simple property, i.e. it is defined by
a <a href="bo.dataTypes.DataType.html">data type</a>, then the output property
is an array. The array elements are objects with a message and a
severity property, that represent the broken rules.
If the model property is a child model, then the output property
is an object as well, whose properties represents model properties
with broken rules, as described above.
If the model property is a child collection, then the output property
is an object as well, whose properties are the indeces of the items of
the collections. The property name is a number in '00000' format. The
property value represents the child item, as described above.
new BrokenRulesResponse(brokenRules[, message])
Creates a new broken rules response instance.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
brokenRules |
|
The broken rules to send to the client. |
|
message |
string |
Yes |
Human-readable description of the reason of the failure. |
- Throws
-
Argument error: The broken rules must be a BrokenRulesOutput object.
-
Argument error: The message must be a string value.
Properties
count number
The count of the broken rules.
read-onlydata
object
The object of the broken rules.
read-onlymessage
string
Human-readable description of the reason of the failure.
read-onlyname
string
The name of the response object.
- Default value
read-onlystatus
number
The status code of the HTTP response.
- Default value