title: ValidationError: ["'' value has an invalid date format. It must be in YYYY-MM-DD format."] in django
body: <p>when I initiate the request for the date field name as dob with the respective value of dob is "dob":"1996-10-25"</p>
  
  <p>Model.py</p>
  
  <pre><code>class Register_model(models.Model):
      UserId = models.CharField(max_length=255,default='',blank=True,null=True)
      ISpinId = models.CharField(max_length=255,primary_key=True, unique=True,default='', blank=True,null = False)
      email = models.CharField(max_length=250, unique=True)
      first_name = models.CharField(max_length=250, default="",null = False)
      last_name = models.CharField(max_length=250, default="",null = False)
      dob = models.DateField(auto_now_add=False, auto_now=False)
      password = models.CharField(max_length=255,blank=False,null = False)
      gender = models.CharField(max_length=50,default="",null = False)
      nationality = models.CharField(max_length=100,default="",null = False)
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>@permission_classes((AllowAny,))
  class User_RegisterAPIViews(APIView):
      # Serializer Initilization
      print("dasf")
      serializers = serializers.Register_Serializer
  
      # Post method Declarations
      def post(self, request):
          request.POST._mutable = True
          print(request.data)
          request.data['ISpinId'] = etc.random_number_generate(request.data['first_name'], request.data['last_name'])
          password = request.data['password']
          print(request.data['dob'])
          playersCategory, age = etc.age_convert(request.data['dob'], request.data['gender'])
          request.data['players_category'] = playersCategory
          request.data['age'] = age
  
          form_data = serializers.Register_Serializer(data=request.data)
          if form_data.is_valid():
              print("formdata",form_data)
              form_data.save()  # File Save
  </code></pre>
  
  <p>Error :</p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
      response = get_response(request)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
      response = self.process_exception_by_middleware(e, request)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
      return view_func(*args, **kwargs)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/views/generic/base.py", line 71, in view
      return self.dispatch(request, *args, **kwargs)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/rest_framework/views.py", line 497, in dispatch
      response = self.handle_exception(exc)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/rest_framework/views.py", line 457, in handle_exception
      self.raise_uncaught_exception(exc)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/rest_framework/views.py", line 468, in raise_uncaught_exception
      raise exc
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/rest_framework/views.py", line 494, in dispatch
      response = handler(request, *args, **kwargs)
    File "/home/shawn-codoid/Music/srfi-api/User/views.py", line 69, in post
      form_data.save()  # File Save
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/rest_framework/serializers.py", line 213, in save
      self.instance = self.create(validated_data)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/rest_framework/serializers.py", line 932, in create
      instance = ModelClass._default_manager.create(**validated_data)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
      return getattr(self.get_queryset(), name)(*args, **kwargs)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/query.py", line 422, in create
      obj.save(force_insert=True, using=self.db)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/base.py", line 741, in save
      force_update=force_update, update_fields=update_fields)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/base.py", line 779, in save_base
      force_update, using, update_fields,
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/base.py", line 870, in _save_table
      result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/base.py", line 908, in _do_insert
      using=using, raw=raw)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
      return getattr(self.get_queryset(), name)(*args, **kwargs)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/query.py", line 1186, in _insert
      return query.get_compiler(using=using).execute_sql(return_id)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1334, in execute_sql
      for sql, params in self.as_sql():
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1278, in as_sql
      for obj in self.query.objs
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1278, in &lt;listcomp&gt;
      for obj in self.query.objs
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1277, in &lt;listcomp&gt;
      [self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1218, in prepare_value
      value = field.get_db_prep_save(value, connection=self.connection)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 789, in get_db_prep_save
      return self.get_db_prep_value(value, connection=connection, prepared=False)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 1273, in get_db_prep_value
      value = self.get_prep_value(value)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 1268, in get_prep_value
      return self.to_python(value)
    File "/home/shawn-codoid/Music/virtual/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 1243, in to_python
      params={'value': value},
  django.core.exceptions.ValidationError: ["'' value has an invalid date format. It must be in YYYY-MM-DD format."]
  [03/Oct/2019 12:29:15] "POST /api/register/ HTTP/1.1" 500 214929
  </code></pre>
  
  <p>I create a new database, Database migrations, and I also apply new migrations but still, I got this error ["'' value has an invalid date format. It must be in YYYY-MM-DD format."]</p>