Thanks for the info, Carlton. Does this work with
HyperlinkedModelSerializer too?
On Thursday, 10 May 2018 17:26:33 UTC+5:30, Carlton Gibson wrote:
>
> Hi Manoj.
>
> Check out the field validation docs:
> http://www.django-rest-framework.org/api-guide/serializers/#field-level-validation
>
Hi Manoj.
Check out the field validation docs:
http://www.django-rest-framework.org/api-guide/serializers/#field-level-validation
Implement a `validate_name` method to transform using `value.lower()`. (or
similar.)
Kind Regards,
Carlton
--
You received this message because you are
I have a model and serializer as below:
class Data(models.Model):
name = models.CharField(max_length=15, primary_key=True)
class DataSerializer(serializers.ModelSerializer):
class Meta:
model = models.DataCenter
fields = ('name',)
It accepts "TEST" as well "test" as