@classmethod
def validate(cls, **kwargs):
    """Validate the kwargs and return cleaned data or raise a HTTPError."""
    data = {}
    for key, value in kwargs.items():
        if cls.fields[key].get('multiple'):
            values = value
            for validator in cls.fields[key].get('list_validators', []):
                values = validator.validate(values)
        else:
            values = [value]
        for value in values:
            for validator in cls.fields[key]['validators']:
                value = validator.validate(value)
        if cls.fields[key].get('multiple'):
            data[key] = values
        else:
            data[key] = values[0]
    return data
