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
Source:stackexchange.com