Pip-Services-Commons-Dotnet
|
Validation rule to combine rules with OR logical operation. When one of rules returns no errors, than this rule also returns no errors. When all rules return errors, than the rule returns all errors. More...
Public Member Functions | |
OrRule (params IValidationRule[] rules) | |
Creates a new validation rule and sets its values. More... | |
void | Validate (string path, Schema schema, object value, List< ValidationResult > results) |
Validates a given value against this rule. More... | |
Private Attributes | |
readonly IValidationRule [] | _rules |
Validation rule to combine rules with OR logical operation. When one of rules returns no errors, than this rule also returns no errors. When all rules return errors, than the rule returns all errors.
See IValidationRule
PipServices3.Commons.Validate.OrRule.OrRule | ( | params IValidationRule [] | rules | ) |
Creates a new validation rule and sets its values.
rules | a list of rules to join with OR operator |
void PipServices3.Commons.Validate.OrRule.Validate | ( | string | path, |
Schema | schema, | ||
object | value, | ||
List< ValidationResult > | results | ||
) |
Validates a given value against this rule.
path | a dot notation path to the value. |
schema | a schema this rule is called from |
value | a value to be validated. |
results | a list with validation results to add new results. |
Implements PipServices3.Commons.Validate.IValidationRule.