Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
7097e5d0
Commit
7097e5d0
authored
Oct 26, 2016
by
Douglas Hall
Committed by
GitHub
Oct 26, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13817 from edx/ibrahimahmed443/WL-744-registration-error-message
Edit error message for Username on registration
parents
f875738d
1459b234
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
common/djangoapps/student/forms.py
+2
-1
common/djangoapps/student/tests/test_create_account.py
+2
-1
No files found.
common/djangoapps/student/forms.py
View file @
7097e5d0
...
@@ -120,7 +120,8 @@ class AccountCreationForm(forms.Form):
...
@@ -120,7 +120,8 @@ class AccountCreationForm(forms.Form):
max_length
=
30
,
max_length
=
30
,
error_messages
=
{
error_messages
=
{
"required"
:
_USERNAME_TOO_SHORT_MSG
,
"required"
:
_USERNAME_TOO_SHORT_MSG
,
"invalid"
:
_
(
"Usernames must contain only letters, numbers, underscores (_), and hyphens (-)."
),
"invalid"
:
_
(
"Usernames can only contain Roman letters, western numerals (0-9), underscores (_), and "
"hyphens (-)."
),
"min_length"
:
_USERNAME_TOO_SHORT_MSG
,
"min_length"
:
_USERNAME_TOO_SHORT_MSG
,
"max_length"
:
_
(
"Username cannot be more than
%(limit_value)
s characters long"
),
"max_length"
:
_
(
"Username cannot be more than
%(limit_value)
s characters long"
),
}
}
...
...
common/djangoapps/student/tests/test_create_account.py
View file @
7097e5d0
...
@@ -471,7 +471,8 @@ class TestCreateAccountValidation(TestCase):
...
@@ -471,7 +471,8 @@ class TestCreateAccountValidation(TestCase):
# Invalid
# Invalid
params
[
"username"
]
=
"invalid username"
params
[
"username"
]
=
"invalid username"
assert_username_error
(
"Usernames must contain only letters, numbers, underscores (_), and hyphens (-)."
)
assert_username_error
(
"Usernames can only contain Roman letters, western numerals (0-9), underscores (_), and "
"hyphens (-)."
)
def
test_email
(
self
):
def
test_email
(
self
):
params
=
dict
(
self
.
minimal_params
)
params
=
dict
(
self
.
minimal_params
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment