Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
intranet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nounous-archives
intranet
Commits
0c69e103
Commit
0c69e103
authored
Dec 14, 2015
by
Valentin Samir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demande un mot de passe sql d'au moins 8 caractères
parent
7be53cfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
pageperso/forms.py
pageperso/forms.py
+8
-2
No files found.
pageperso/forms.py
View file @
0c69e103
...
...
@@ -27,6 +27,12 @@ class SqlPasswordForm(forms.Form):
required
=
True
)
def
clean_password
(
self
):
if
len
(
self
.
cleaned_data
[
"password"
])
<
8
:
raise
forms
.
ValidationError
(
"Le mot de passe doit faire au moins 8 caractères"
)
return
self
.
cleaned_data
[
"password"
]
def
clean
(
self
):
if
self
.
cleaned_data
.
get
(
"password"
)
!=
self
.
cleaned_data
.
get
(
"password_confirmation"
):
raise
forms
.
ValidationError
(
"Les mots de passes ne sont pas identique"
)
if
"password"
in
self
.
cleaned_data
:
if
self
.
cleaned_data
[
"password"
]
!=
self
.
cleaned_data
.
get
(
"password_confirmation"
):
raise
forms
.
ValidationError
(
"Les mots de passes ne sont pas identique"
)
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