HedValidator

class HedValidator(hed_schema, def_dicts=None, definitions_allowed=False)[source]

Top level validation of HED strings.

Methods

hed.validator.hed_validator.HedValidator.__init__(...)

Constructor for the HedValidator class.

hed.validator.hed_validator.HedValidator.run_basic_checks(...)

hed.validator.hed_validator.HedValidator.run_full_string_checks(...)

hed.validator.hed_validator.HedValidator.validate(...)

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.run_basic_checks(hed_string, allow_placeholders)[source]
HedValidator.run_full_string_checks(hed_string)[source]
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)