def validate_training_job_prefix()

in smdebug_rulesconfig/actions/utils.py [0:0]


def validate_training_job_prefix(key, value):
    if not isinstance(value, str):
        raise ValueError(f"{key} must be a string!")
    if not re.match(TRAINING_JOB_PREFIX_REGEX, value):
        raise ValueError(
            "Invalid training job prefix! Must contain only letters, numbers and hyphens!"
        )