Pip-Services-Commons-Dotnet
|
Interface for validation rules. More...
Public Member Functions | |
void | Validate (string path, Schema schema, object value, List< ValidationResult > results) |
Validates a given value against this rule. More... | |
Interface for validation rules.
Validation rule can validate one or multiple values against complex rules like: value is in range, one property is less than another property, enforce enumerated values and more. This interface allows to implement custom rules.
void PipServices3.Commons.Validate.IValidationRule.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. |
Implemented in PipServices3.Commons.Validate.PropertiesComparisonRule, PipServices3.Commons.Validate.AndRule, PipServices3.Commons.Validate.OrRule, PipServices3.Commons.Validate.AtLeastOneExistsRule, PipServices3.Commons.Validate.OnlyOneExistsRule, PipServices3.Commons.Validate.ValueComparisonRule, PipServices3.Commons.Validate.ExcludedRule, and PipServices3.Commons.Validate.IncludedRule.