pip_services3_commons.validate.ExcludedRule module
pip_services3_commons.validate.ExcludedRule
Excluded rule implementation
- copyright
Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details.
- license
MIT, see LICENSE for more details.
-
class
pip_services3_commons.validate.ExcludedRule.
ExcludedRule
(*values: Any) Bases:
pip_services3_commons.validate.IValidationRule.IValidationRule
Validation rule to check that args is excluded from the list of constants.
Example:
schema = Schema().with_rule(ExcludedRule(1, 2, 3)) schema.validate(2) # Result: 2 must not be one of 1, 2, 3 schema.validate(10) # Result: no errors
-
validate
(path: str, schema: <module 'pip_services3_commons.validate.Schema' from '/pip_services3_commons/validate/Schema.py'>, 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.
-