Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
U
ungleich-user
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mondi Ravi
ungleich-user
Commits
26916f7d
Commit
26916f7d
authored
May 01, 2020
by
fnux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Validate username format in what seem to be WIP API?
parent
ac7d9df7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
dal/views.py
dal/views.py
+4
-0
No files found.
dal/views.py
View file @
26916f7d
...
...
@@ -511,6 +511,10 @@ class UserCreateAPI(APIView):
if
username
==
""
or
not
username
:
return
Response
(
'Please supply a username.'
,
400
)
if
not
is_username_valid
(
username
):
return
Response
(
'Username is not valid.'
,
400
)
try
:
validate_email
(
email
)
except
ValidationError
:
...
...
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