I created a model have a field as charField and has max_length then i created a model serailzer for that model by the serializer is not validating the field with max_length
class MyModel(models.Model):
name = models.CharField(max_length=255, verbose_name=_("Name"))
class MyModelSerializer(ModelSerializer):
classs Meta:
model=MyModel
fields = "all"
when I send a post request with name as 256 chars it is throwing 500 it should throw 400