# Path: ipuz/structures/enumeration.py
# def validate_enumeration(field_data):
#     if not isinstance(field_data, str):
#         return False
#     return True
# 
# def validate_enumeration_field(field_name, field_data):
#     if not validate_enumeration(field_data):
#         raise IPUZException("Invalid {} value found".format(field_name))
# 
# Path: ipuz/validators.py
# def validate_bool(field_name, field_data):
#     if not isinstance(field_data, bool):
#         raise IPUZException("Invalid {} value found".format(field_name))
# 
# def validate_dict_of_strings(field_name, field_data):
#     if not isinstance(field_data, dict):
#         raise IPUZException("Invalid {} value found".format(field_name))
#     for key, value in field_data.items():
#         validate_string(field_name, key)
#         validate_string(field_name, value)
# 
# def validate_list(field_name, field_data, element_name, validate_element):
#     if not isinstance(field_data, list):
#         raise IPUZException("Invalid {} value found".format(field_name))
#     for element in field_data:
#         if not validate_element(element):
#             message = "Invalid {} in {} element found".format(
#                 element_name, field_name
#             )
#             raise IPUZException(message)
# 
# def validate_list_of_strings(field_name, field_data):
#     if not isinstance(field_data, list):
#         raise IPUZException("Invalid {} value found".format(field_name))
#     for element in field_data:
#         validate_string(field_name, field_data)
# 
# def validate_non_negative_int(field_name, field_data):
#     validate_int(field_name, field_data)
#     if field_data < 0:
#         raise IPUZException("Invalid {} value found".format(field_name))
# 
# def validate_string(field_name, field_data):
#     if not isinstance(field_data, str):
#         raise IPUZException("Invalid {} value found".format(field_name))


from ipuz.structures import (
    validate_enumeration,
    validate_enumeration_field,
)
from ipuz.validators import (
    validate_bool,
    validate_dict_of_strings,
    validate_list,
    validate_list_of_strings,
    validate_non_negative_int,
    validate_string,
)


IPUZ_ANSWER_VALIDATORS = {
    "choices": validate_list_of_strings,
    "randomize": validate_bool,
    "answer": validate_string,
    "answers": validate_list_of_strings,
    "enumeration": validate_enumeration_field,
    "enumerations": (validate_list, "Enumeration", validate_enumeration),
    "requiredanswers": validate_non_negative_int,
    "misses": validate_dict_of_strings,

# Path: ipuz/structures/enumeration.py
# def validate_enumeration(field_data):
#     if not isinstance(field_data, str):
#         return False
#     return True
# 
# def validate_enumeration_field(field_name, field_data):
#     if not validate_enumeration(field_data):
#         raise IPUZException("Invalid {} value found".format(field_name))
# 
# Path: ipuz/validators.py
# def validate_bool(field_name, field_data):
#     if not isinstance(field_data, bool):
#         raise IPUZException("Invalid {} value found".format(field_name))
# 
# def validate_dict_of_strings(field_name, field_data):
#     if not isinstance(field_data, dict):
#         raise IPUZException("Invalid {} value found".format(field_name))
#     for key, value in field_data.items():
#         validate_string(field_name, key)
#         validate_string(field_name, value)
# 
# def validate_list(field_name, field_data, element_name, validate_element):
#     if not isinstance(field_data, list):
#         raise IPUZException("Invalid {} value found".format(field_name))
#     for element in field_data:
#         if not validate_element(element):
#             message = "Invalid {} in {} element found".format(
#                 element_name, field_name
#             )
#             raise IPUZException(message)
# 
# def validate_list_of_strings(field_name, field_data):
#     if not isinstance(field_data, list):
#         raise IPUZException("Invalid {} value found".format(field_name))
#     for element in field_data:
#         validate_string(field_name, field_data)
# 
# def validate_non_negative_int(field_name, field_data):
#     validate_int(field_name, field_data)
#     if field_data < 0:
#         raise IPUZException("Invalid {} value found".format(field_name))
# 
# def validate_string(field_name, field_data):
#     if not isinstance(field_data, str):
#         raise IPUZException("Invalid {} value found".format(field_name))


# Path: ipuz/puzzlekinds/answer.py
from ipuz.structures import (
    validate_enumeration,
    validate_enumeration_field,
)
from ipuz.validators import (
    validate_bool,
    validate_dict_of_strings,
    validate_list,
    validate_list_of_strings,
    validate_non_negative_int,
    validate_string,
)



IPUZ_ANSWER_VALIDATORS = {
    "choices": validate_list_of_strings,
    "randomize": validate_bool,
    "answer": validate_string,
    "answers": validate_list_of_strings,
    "enumeration": validate_enumeration_field,
    "enumerations": (validate_list, "Enumeration", validate_enumeration),
    "requiredanswers": validate_non_negative_int,
    "misses": validate_dict_of_strings,

    "guesses": validate_list_of_strings,