dajgno rest field number but got string validation code example
Example: how to set required drf serialzier
class MySerializer(serializer.Modelserializer):
class Meta:
model = MyModel
fields = ['id', 'title']
extra_kwargs = {
"title": {"required": False}
}