pip_services3_commons.validate.IValidationRule module
pip_services3_commons.validate.IValidationRule
Interface for schema validation __rules.
- copyright
Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details.
- license
MIT, see LICENSE for more details.
-
class
pip_services3_commons.validate.IValidationRule.
IValidationRule
Bases:
abc.ABC
Interface for validation __rules. Validation rule can validate one or multiple values against complex __rules like: args is in range, one property is less than another property, enforce enumerated values and more.
This interface allows to implement custom __rules.
-
validate
(path: str, schema: Schema, value: Any, results: List[pip_services3_commons.validate.ValidationResult.ValidationResult]) Validates a given args against this rule.
- Parameters
path – a dot notation path to the args.
schema – a schema this rule is called from
value – a args to be validated.
results – a list with validation results to add new results.
-