all_validator
trestle.core.all_validator
¤
Validate based on all registered validators.
Classes¤
AllValidator
¤
Bases: Validator
Validator to confirm the model passes all registered validation tests.
Source code in trestle/core/all_validator.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
Attributes¤
last_failure_msg: str
instance-attribute
¤
Functions¤
error_msg()
¤
Return information on which validation failed.
Source code in trestle/core/all_validator.py
30 31 32 |
|
model_is_valid(model, quiet, trestle_root=None)
¤
Validate an oscal model against all available validators in the trestle library.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
OscalBaseModel
|
An Oscal model that can be passed to the validator. |
required |
quiet
|
bool
|
Don't report msgs unless invalid. |
required |
Returns:
Type | Description |
---|---|
bool
|
True (valid) if the model passed all registered validators. |
Source code in trestle/core/all_validator.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
handler: python