new ValidationResult(ruleName, propertyName, message)
Creates a new validation rule result object.
Parameters:
Name | Type | 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. |
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.
Extends
Members
-
<readonly> affectedProperties :Array.<bo.shared.PropertyInfo>
-
An array of properties that are affected by the rule.
Type:
- Array.<bo.shared.PropertyInfo>
-
<readonly> isPreserved :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.
Type:
- boolean
- Inherited From:
-
<readonly> message :string
-
Human-readable description of the reason of the failure.
Type:
- string
- Inherited From:
-
<readonly> propertyName :string
-
The name of the property the rule belongs to.
Type:
- string
- Inherited From:
-
<readonly> ruleName :string
-
The name of the rule.
Type:
- string
- Inherited From:
-
<readonly> severity :bo.rules.RuleSeverity
-
The severity of the rule failure.
Type:
- Inherited From:
-
<readonly> stopsProcessing :boolean
-
Indicates whether processing the rules of the property should stop.
Type:
- boolean
- Inherited From:
Methods
-
toBrokenRule() → {bo.rules.BrokenRule}
-
Maps the rule result to broken rule.
- Inherited From:
Returns:
The broken rule companion of the rule result.
- Type
- bo.rules.BrokenRule