tag_validator_util

Utilities to support HED validation.

Functions

is_clock_face_time(time_string)

Check if a valid HH:MM time string.

is_date_time(date_time_string)

Check if the specified string is a valid datetime.

validate_numeric_value_class(numeric_string)

Checks to see if valid numeric value.

validate_text_value_class(text_string)

Placeholder for eventual text value class validation

is_clock_face_time(time_string)[source]

Check if a valid HH:MM time string.

Parameters:

time_string (str) – A time string.

Returns:

True if the time string is valid. False, if otherwise.

Return type:

bool

Notes

  • This is deprecated and has no expected use going forward.

is_date_time(date_time_string)[source]

Check if the specified string is a valid datetime.

Parameters:

date_time_string (str) – A datetime string.

Returns:

True if the datetime string is valid. False, if otherwise.

Return type:

bool

Notes

  • ISO 8601 datetime string.

validate_numeric_value_class(numeric_string)[source]

Checks to see if valid numeric value.

Parameters:

numeric_string (str) – A string that should be only a number with no units.

Returns:

True if the numeric string is valid. False, if otherwise.

Return type:

bool

validate_text_value_class(text_string)[source]

Placeholder for eventual text value class validation

Parameters:

text_string (str) – Text class.

Returns:

True

Return type:

bool