title: Django Rest Framework custom serializer's ValidationError not working
body: <p>I am trying to set up a custom login serializer in Django and want a custom response but the default one always show: </p>
  
  <pre><code>{
      "username":[
          "This field is required."
      ],
      "password":[
          "This field is required."
      ]
  }
  </code></pre>
  
  <p>I tried to set up my serializer like so:</p>
  
  <pre><code> class MyLoginSerializer(serializers.Serializer):
      username = serializers.CharField(required=True, allow_blank=True)
      email = serializers.EmailField(required=False, allow_blank=True)
      password = serializers.CharField(style={'input_type': 'password'})
      def authenticate(self, **kwargs):
          return authenticate(self.context['request'], **kwargs)
      def _validate_email(self, email, password):
          user = None
          if email and password:
              user = self.authenticate(email=email, password=password)
          else:
              msg = _('Must include "email" and "password".')
              raise serializers.ValidationError(msg)
          return user
      def _validate_username(self, username, password):
          print("in username")
          user = None
          if username and password:
              print("in username 2")
              try:
                  user = self.authenticate(username=username, password=password)
              except Exception:
                  raise serializers.ValidationError("Wrong")
          else:
              print("in username 3")
              msg = _('Must include "username" and "password".')
              raise serializers.ValidationError(msg)
          return user
      def _validate_username_email(self, username, email, password):
          user = None
          if email and password:
              user = self.authenticate(email=email, password=password)
          elif username and password:
              user = self.authenticate(username=username, password=password)
          else:
              msg = _(
                  'Must include either "username" or "email" and "password".'
                  )
              raise serializers.ValidationError(msg)
          return user
      def validate(self, attrs):
          username = attrs.get('username')
          email = attrs.get('email')
          password = attrs.get('password')
          user = None
          if 'allauth' in settings.INSTALLED_APPS:
              from allauth.account import app_settings
              # Authentication through email
              if (app_settings.AUTHENTICATION_METHOD ==
                      app_settings.AuthenticationMethod.EMAIL):
                  user = self._validate_email(email, password)
              # Authentication through username
              elif (app_settings.AUTHENTICATION_METHOD ==
                      app_settings.AuthenticationMethod.USERNAME):
                  user = self._validate_username(username, password)
              # Authentication through either username or email
              else:
                  user = self._validate_username_email(username, email, password)
          else:
              # Authentication without using allauth
              if email:
                  try:
                      username = GameUser.objects\
                          .get(email__iexact=email)\
                          .get_username()
                  except UserModel.DoesNotExist:
                      pass
              if username:
                  user = self._validate_username_email(username, '', password)
          # Did we get back an active user?
          if user:
              if not user.is_active:
                  msg = ('User account is disabled.')
                  raise exceptions.ValidationError(msg)
          else:
              msg = ('Wrong login information.')
              raise exceptions.ValidationError(msg)
          # If required, is the email verified?
          if 'rest_auth.registration' in settings.INSTALLED_APPS:
              from allauth.account import app_settings
              if app_settings.EMAIL_VERIFICATION == app_settings\
                      .EmailVerificationMethod\
                      .MANDATORY:
                  email_address = user.emailaddress_set.get(email=user.email)
                  if not email_address.verified:
                      raise serializers.ValidationError((
                          'E-mail is not verified.'
                      ))
          attrs['user'] = user
          return attrs
  </code></pre>
  
  <p>And I have this set as my login serializer in my settings.py:</p>
  
  <pre><code>REST_AUTH_SERIALIZERS ={
      'LOGIN_SERIALIZER': 'api.serializer.MyLoginSerializer'
  }
  </code></pre>
  
  <p>And here is my custom login view: </p>
  
  <pre><code>class CustomLoginView(LoginView):
      permission_classes = (AllowAny,)
      serializer_class = MyLoginSerializer
      def get_response(self):
          original_response = super().get_response()
          print("ORIGINAL REESPONSE:")
          print(str(self.user))
          mydata = {"username": str(self.user), "status": "success"}
          original_response.data.update(mydata)
          return original_response
  </code></pre>
  
  <p>How would I get it to show the custom <code>'Must include "email" and "password".'</code> instead of the default message?</p>
  
  <p>Thanks!</p>