def enum_validator(v, field, config, **kwargs) -> Enum:
    enum_v = field.type_(v)
    return (enum_v.value if config.use_enum_values else enum_v)
def enum_validator(v, field, config, **kwargs) -> Enum:
    enum_v = field.type_(v)
    return (enum_v.value if config.use_enum_values else enum_v)