Validation rule that compares value to a constant.
More...
|
readonly string | _operation |
|
readonly object | _value |
|
Validation rule that compares value to a constant.
schema.Validate(1);
schema.Validate(2);
◆ ValueComparisonRule()
PipServices3.Commons.Validate.ValueComparisonRule.ValueComparisonRule |
( |
string |
operation, |
|
|
object |
value |
|
) |
| |
Creates a new validation rule and sets its values.
- Parameters
-
operation | a comparison operation. |
value | a constant value to compare to |
◆ Validate()
void PipServices3.Commons.Validate.ValueComparisonRule.Validate |
( |
string |
path, |
|
|
Schema |
schema, |
|
|
object |
value, |
|
|
List< ValidationResult > |
results |
|
) |
| |
Validates a given value against this rule.
- Parameters
-
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.
The documentation for this class was generated from the following file:
- src/Validate/ValueComparisonRule.cs