code: def validate_username(self, value):
          
          try:
              user = User.objects.get(username=value)
          except User.DoesNotExist:
              raise serializers.ValidationError("User does not exist")
  
          try:
              enterprise_customer_user = models.EnterpriseCustomerUser.objects.get(user_id=user.pk)
          except models.EnterpriseCustomerUser.DoesNotExist:
              raise serializers.ValidationError("User has no EnterpriseCustomerUser")
  
          self.enterprise_customer_user = enterprise_customer_user
          return value
docs: Verify that the username has a matching user, and that the user has an associated EnterpriseCustomerUser.