Pip-Services-Commons-Dotnet
|
Validation rule that compares two object properties. More...
Public Member Functions | |
PropertiesComparisonRule (string property1, string operation, string property2) | |
Creates a new validation rule and sets its arguments. More... | |
void | Validate (string path, Schema schema, object value, List< ValidationResult > results) |
Validates a given value against this rule. More... | |
Private Attributes | |
readonly string | _property1 |
readonly string | _property2 |
readonly string | _operation |
Validation rule that compares two object properties.
See IValidationRule
PipServices3.Commons.Validate.PropertiesComparisonRule.PropertiesComparisonRule | ( | string | property1, |
string | operation, | ||
string | property2 | ||
) |
Creates a new validation rule and sets its arguments.
property1 | a name of the first property to compare. |
operation | a comparison operation. |
property2 | a name of the second property to compare. |
void PipServices3.Commons.Validate.PropertiesComparisonRule.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.