Pip-Services-Commons-Dotnet
|
Validation rule to combine rules with AND logical operation. When all rules returns no errors, than this rule also returns no errors. When one of the rules return errors, than the rules returns all errors. More...
Public Member Functions | |
AndRule (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 AND logical operation. When all rules returns no errors, than this rule also returns no errors. When one of the rules return errors, than the rules returns all errors.
See IValidationRule
PipServices3.Commons.Validate.AndRule.AndRule | ( | params IValidationRule [] | rules | ) |
Creates a new validation rule and sets its values.
rules | a list of rules to join with AND operator |
void PipServices3.Commons.Validate.AndRule.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.