new BrokenRule(ruleName, isPreserved, propertyName, message, severity)
Creates a new broken rule instance.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
ruleName |
string | The name of the failed rule. |
|
isPreserved |
boolean | Indicates whether the broken rule of this failure is preserved when a new verification starts. |
|
propertyName |
string |
<optional> |
The name of the property the rule belongs to. |
message |
string | Human-readable description of the reason of the failure. |
|
severity |
bo.rules.RuleSeverity | The severity of the rule failure. |
Throws:
-
Argument error: The rule name must be a non-empty string.
-
Argument error: The preservation flag must be a Boolean value.
-
Argument error: The property name must be a string.
-
Argument error: The message must be a non-empty string.
-
Argument error: The severity must be a RuleSeverity item.
Members
-
isPreserved :boolean
-
Indicates whether the broken rule is preserved when a new verification starts.
Type:
- boolean
-
message :string
-
Human-readable description of the reason of the failure.
Type:
- string
-
propertyName :string
-
The name of the property the failed rule belongs to.
Type:
- string
-
ruleName :string
-
The name of the failed rule.
Type:
- string
-
severity :bo.rules.RuleSeverity
-
The severity of the rule failure.
Type: