HedValidator¶
- class HedValidator(hed_schema, def_dicts=None, definitions_allowed=False)[source]
Top level validation of HED strings.
Methods
Constructor for the HedValidator class. |
|
|
|
|
|
Validate the string using the schema |
Attributes
- HedValidator.__init__(hed_schema, def_dicts=None, definitions_allowed=False)[source]¶
Constructor for the HedValidator class.
- Parameters:
hed_schema (HedSchema or HedSchemaGroup) – HedSchema object to use for validation.
def_dicts (DefinitionDict or list or dict) – the def dicts to use for validation
definitions_allowed (bool) – If False, flag definitions found as errors
- HedValidator.validate(hed_string, allow_placeholders, error_handler=None)[source]¶
Validate the string using the schema
- Parameters:
hed_string (HedString) – the string to validate
allow_placeholders (bool) – allow placeholders in the string
error_handler (ErrorHandler or None) – the error handler to use, creates a default one if none passed
- Returns:
A list of issues for hed string
- Return type:
issues (list of dict)