class staticbo.rules. BrokenRule
Source: rules/
Represents the public turnout of a failed rule.
Properties
new BrokenRule(ruleName, isPreserved[, propertyName], message, severity)
Creates a new broken rule instance.
Parameters
Name | Type | Optional | 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 |
Yes |
The name of the property the rule belongs to. |
message |
string |
|
Human-readable description of the reason of the failure. |
severity |
|
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.
Properties
isPreserved boolean
Indicates whether the broken rule is preserved when a new verification starts.
message string
Human-readable description of the reason of the failure.
propertyName string
The name of the property the failed rule belongs to.
ruleName string
The name of the failed rule.
severity bo.rules.RuleSeverity
The severity of the rule failure.