[Answered ]-How to change the default error message of username in Django

1👍

I think something like this should work.

class User(AbstractUser):
    nickname = models.CharField(unique=True, error_messages={'unique':"This is error message for unique parameter."})

)

You can read more here: https://docs.djangoproject.com/en/4.0/ref/models/fields/#error-messages

Leave a comment