cross_validator
Class and interface definitions for top level validators.
CompositeValidator
Class to compose CrossValidators.
Source code in mlte/store/validators/cross_validator.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
validators = validators
instance-attribute
List of validators to execute.
__init__(validators=[])
Initialize a CompositeValidator instance.
Source code in mlte/store/validators/cross_validator.py
12 13 14 15 16 | |
validate_all(new_resource)
Validate all validators.
Source code in mlte/store/validators/cross_validator.py
18 19 20 21 22 | |
CrossValidator
Bases: ABC
Interface to define a CrossValidator that validates store entries against data in separate stores.
Source code in mlte/store/validators/cross_validator.py
25 26 27 28 29 30 31 32 33 34 35 36 37 | |
validate(new_resource)
abstractmethod
Validate a resource.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_resource
|
Any
|
The data to create or edit the resource to be validated |
required |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
On failed validation |
Source code in mlte/store/validators/cross_validator.py
28 29 30 31 32 33 34 35 36 37 | |