Merge pull request #9371 from edx/tasawer/story/ecom-1956-updte-validation-message-on-registration-page
Updating validation error message on signup page.
This commit is contained in:
@@ -108,7 +108,7 @@ class AccountCreationForm(forms.Form):
|
||||
max_length=30,
|
||||
error_messages={
|
||||
"required": _USERNAME_TOO_SHORT_MSG,
|
||||
"invalid": _("Username should only consist of A-Z and 0-9, with no spaces."),
|
||||
"invalid": _("Usernames must contain only letters, numbers, underscores (_), and hyphens (-)."),
|
||||
"min_length": _USERNAME_TOO_SHORT_MSG,
|
||||
"max_length": _("Username cannot be more than %(limit_value)s characters long"),
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ class TestCreateAccountValidation(TestCase):
|
||||
|
||||
# Invalid
|
||||
params["username"] = "invalid username"
|
||||
assert_username_error("Username should only consist of A-Z and 0-9, with no spaces.")
|
||||
assert_username_error("Usernames must contain only letters, numbers, underscores (_), and hyphens (-).")
|
||||
|
||||
def test_email(self):
|
||||
params = dict(self.minimal_params)
|
||||
|
||||
Reference in New Issue
Block a user