class MySerializer(serializers.Serializer):
contract = fields.ChoiceField(choices=(
('no', 'no'),
('yes', 'yes'),
))
So here my input may be one of the following. no no yes yes
for this I need to add 2 more entries for Capital one?
contract = fields.ChoiceField(choices=(
('no', 'no'),
('yes', 'yes'),
('No', 'no'),
('Yes', 'yes'),
))
or is there a way we can ignore the case?
source
share