title: DRF: Validate nested serializer data when creating, but not when updating
body: <p>When using writable nested serializers in DRF there is the known problem with validating eventual unique fields and preventing the updating of the parent serializer. This issue has been asked many times in questions like these:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/38438167/unique-validation-on-nested-serializer-on-django-rest-framework">Unique validation on nested serializer on Django Rest Framework</a></li>
  <li><a href="https://stackoverflow.com/questions/43618662/django-rest-framework-not-creating-object-with-fk-to-a-model-with-unique-true-fi/43689912?noredirect=1#comment83511542_43689912">Django rest framework not creating object with FK to a model with unique=True field</a></li>
  </ol>
  
  <p>For simplicity let's take the example from the first question:</p>
  
  <pre><code>class GenreSerializer(serializers.ModelSerializer):
      class Meta:
          fields = ('name',) #This field is unique
          model = Genre
          extra_kwargs = {
              'name': {'validators': []},
          }
  
  class BookSerializer(serializers.ModelSerializer):
      genre = GenreSerializer()
  
      class Meta:
          model = Book
          fields = ('name', 'genre')
  
      def create(self, validated_data):
          # implement creating
  
      def update(self, instance, validated_data):
          # implement updating
  </code></pre>
  
  <p>Now the problem is that the uniqueness validation is dropped out also for creating. This could be intercepted in the view, for example:</p>
  
  <pre><code>class BookViewSet(viewsets.ModelViewSet):
      queryset = Book.objects.all()
      serializer = BookSerializer
  
      def perform_create(self):
          # implement logic and raise ValidationError
  </code></pre>
  
  <p>However this doesn't feel really right because we're validating the uniqueness of <code>Genre</code> in <code>BookViewSet</code>.</p>
  
  <p>The other option is to implement the validation in the <code>create()</code> method of <code>BookSerializer</code> as explained in the second question (see list above).</p>
  
  <p>What I really miss in both solutions is that the validation error is not attached to the field <code>name</code> of the model <code>Genre</code> and the user input in the form is lost.</p>
  
  <p>What I'd like is to add the validation error for <code>Genre.name</code> to the existing validation errors, keep the user input and do this only for creating, not for updating.</p>
  
  <p>My ideas were something like this:</p>
  
  <pre><code>class GenreSerializer(serializers.ModelSerializer):
      # ...
      def validate_name(self, value):
          # is it possible to check here if it is create or update?
          if create: # this is a placeholder for the logic
               if self.Meta.model.objects.filter(name=value).exists():
                   raise ValidationError('A genre with this name already exists.')
          return value
  
      # or to override the __init__ method
  
      def __init__(self, *args, **kwargs):
          super(GenreSerializer, self).__init__(*args, **kwargs)
          # check if create or update
          if create:
              self.fields['name'].validators.append('validation logic')
  </code></pre>
  
  <p>Is this possible or is there any other way to achieve the before mentioned goal - keep user input and add validation error attached to the field <code>name</code> to the list of existing validation errors when creating new instance?      </p>