'Validates that the input is in self.choices.'

def validate(self, value):

    super(CustomTypedChoiceField, self).validate(value)
    if ((value is not None) and (not self.valid_value(value))):
        raise ValidationError(self.error_messages['invalid_choice'], code='invalid_choice', params={'value': value})
