class staticbo.rules. ValidationResult
Source: rules/
Represents the failed result of executing a validation rule.
new ValidationResult(ruleName, propertyName, message)
Creates a new validation rule result object.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
ruleName |
string |
|
The name of the rule. |
propertyName |
string |
|
The name of the property the rule belongs to. |
message |
string |
|
Human-readable description of the reason of the failure. |
- Extends
- bo.rules.ResultBase
- Throws
-
Argument error: The rule name must be a non-empty string.
-
Argument error: The property name must be a non-empty string.
-
Argument error: The message must be a non-empty string.
Properties
read-onlyaffectedProperties
Array of bo.shared.PropertyInfo
An array of properties that are affected by the rule.
read-onlyisPreserved
boolean
Indicates whether the broken rule of this failure is preserved when a new verification starts. Typically the broken rules of authorization rules are retained.
- Inherited from
- bo.rules.ResultBase#isPreserved
read-onlymessage
string
Human-readable description of the reason of the failure.
- Inherited from
- bo.rules.ResultBase#message
read-onlypropertyName
string
The name of the property the rule belongs to.
- Inherited from
- bo.rules.ResultBase#propertyName
read-onlyruleName
string
The name of the rule.
- Inherited from
- bo.rules.ResultBase#ruleName
read-onlyseverity
bo.rules.RuleSeverity
The severity of the rule failure.
- Inherited from
- bo.rules.ResultBase#severity
read-onlystopsProcessing
boolean
Indicates whether processing the rules of the property should stop.
- Inherited from
- bo.rules.ResultBase#stopsProcessing