Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Customize registration error message

Marcin Gębalab68c94e772b0
diff --git a/saleor/account/forms.py b/saleor/account/forms.py
index 925c7c6cee..4b45a4aa8d 100644
--- a/saleor/account/forms.py
+++ b/saleor/account/forms.py
@@ -70,6 +70,11 @@ class LoginForm(django_forms.AuthenticationForm):
class SignupForm(forms.ModelForm):
password = forms.CharField(
widget=forms.PasswordInput)
+ email = forms.EmailField(
+ error_messages={
+ 'unique': pgettext_lazy(
+ 'Registration error',
+ 'This email has already been registered.')})
class Meta:
model = User