# Path: webtools/formdata/exceptions.py
# class ValidateError(Exception):
#     pass


from .exceptions import ValidateError
        return value


class Integer(Type):
    def to_python(self, value, field):
        if len(value) != 1:
            raise ValidateError("Invalid data")

        try:
            return int(value[0])
        except (ValueError, TypeError) as e:
            raise ValidateError("Invalid data")


class Unicode(Type):
    def to_python(self, value, field):
        if len(value) != 1:
            raise ValidateError("Invalid data")
        return value[0]


class MultipleUnicode(Type):
    pass


class MultipleInteger(Type):
    def to_python(self, value, field):
        try:
            return [int(x) for x in value]
        except (ValueError, TypeError):

# Path: webtools/formdata/exceptions.py
# class ValidateError(Exception):
#     pass


# Path: webtools/formdata/data_types.py
from .exceptions import ValidateError

        return value


class Integer(Type):
    def to_python(self, value, field):
        if len(value) != 1:
            raise ValidateError("Invalid data")

        try:
            return int(value[0])
        except (ValueError, TypeError) as e:
            raise ValidateError("Invalid data")


class Unicode(Type):
    def to_python(self, value, field):
        if len(value) != 1:
            raise ValidateError("Invalid data")
        return value[0]


class MultipleUnicode(Type):
    pass


class MultipleInteger(Type):
    def to_python(self, value, field):
        try:
            return [int(x) for x in value]
        except (ValueError, TypeError):

            raise ValidateError("Invalid data")