title: Django serializer does not throw error for flawed validated data
body: <p>I am running a django application and I have a simple class-based django-rest <code>CreateView</code>. My problem is that data actually gets created even though I sent flawed data. I am not entirely sure if that's expected behaviour, but I think it shouldn't be.</p>
  <p>View is simple:</p>
  <pre><code>class ModelCreate(CreateAPIView):
      &quot;&quot;&quot;Create instance&quot;&quot;&quot;
  
      serializer_class = ModelCreateSerializer
      queryset = ModelCreate.objects.all()
  </code></pre>
  <p>In my serializer I am overwriting the create method for some custom behaviour and I am adding two write-only fields that I need for my data creation:</p>
  <pre><code> class ModelCreate(serializers.ModelSerializer):
      &quot;&quot;&quot;Serialize objects.&quot;&quot;&quot;
  
      field_extra1 = serializers.CharField(write_only=True, required=True)
      field_extra2 = serializers.CharField(write_only=True, required=True)
  
      class Meta:
          model = ModelCreate
          fields = (
              &quot;field_extra1&quot;,
              &quot;field_extra2&quot;,
              &quot;field3&quot;,
              &quot;field4&quot;,
              &quot;field5&quot;,
              &quot;field6&quot;,
              &quot;field7&quot;,
              ...
          )
  
      def create(self, validated_data):
          &quot;&quot;&quot;Create obj and relate to other model.&quot;&quot;&quot;
  
          field_extra1 = validated_data.pop(&quot;field_extra1&quot;)
          field_extra2 = validated_data.pop(&quot;field_extra2&quot;)
          obj = Model.objects.get(name=field_extra1)
          relation = obj.objects.filter(name=field_extra2)[0]
          validated_data[&quot;relation&quot;] = relation
          result = ModelCreate.objects.create(**validated_data)
          return result
  </code></pre>
  <p>My model has many optional fields.</p>
  <pre><code>   field_fk = models.ForeignKey(
          Model,
          on_delete=models.CASCADE,
          related_name=&quot;building_objects&quot;,
      )
     field_m2m = models.ManyToManyField(
          Model,
          default=None,
          blank=True,
      )
     field3 = models.CharField(
          max_length=120,
          null=True,
          blank=True,
      )
      field4 = models.FloatField(
          null=True,
          blank=True,
          validators=[MinValueValidator(0.0)],
      )
      field5 = models.FloatField(
          null=True,
          blank=True,
          validators=[MinValueValidator(0.0), MaxValueValidator(1.0)]
      )
      field6 = models.FloatField(
          null=True,
          blank=True,
          validators=[MinValueValidator(0.0)],
      )
      field7 = models.FloatField(
          null=True,
          blank=True,
          validators=[MinValueValidator(0.0)],
      )
  
  </code></pre>
  <p>Now what happens is that if I send a random made up extra field in my JSON the data gets created  and the validated data just ignores the field:</p>
  <p>Let's say I send data like this:</p>
  <pre><code>data = {
          &quot;field_extra1&quot;: &quot;foo&quot;,
          &quot;field_extra2&quot;: &quot;foo&quot;,
          &quot;field3&quot;: &quot;bar&quot;,
          &quot;field3&quot;: &quot;bar&quot;,
          &quot;bullshit-field&quot;: &quot;bullshitvalue&quot;,
      }
  
  
  r = requests.request(
  &quot;post&quot;,
  json=data,
   url=url,
  )
  
  print(r.status_code)
  
  </code></pre>
  <p>It creates the data without complaints.</p>
  <p>What I expected is that the the serializer should notice that there is a bullshitfield and throw an error. Because what happens when I have a typo, it just ignores the field alltogether. So I doubt that this is the desired behaviour.</p>
  <p>If this is in fact the standard behaviour is there a way to change it?</p>
  <p>Thanks in advance for hints and help! Very much appreciated.</p>