Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
oser-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hamza Touizrat
oser-frontend
Commits
0eb8deb1
Commit
0eb8deb1
authored
Mar 5, 2021
by
felivigneau
Browse files
Options
Downloads
Patches
Plain Diff
mise en commentaire de la condition sur le mdp
parent
12651182
No related branches found
No related tags found
2 merge requests
!70
Test new form
,
!71
Add context sheet for visits, frontend
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/signup/core/customValidationModule.ts
+4
-4
4 additions, 4 deletions
src/app/signup/core/customValidationModule.ts
src/app/signup/student-signup/student-signup.component.ts
+2
-2
2 additions, 2 deletions
src/app/signup/student-signup/student-signup.component.ts
with
6 additions
and
6 deletions
src/app/signup/core/customValidationModule.ts
+
4
−
4
View file @
0eb8deb1
...
...
@@ -29,9 +29,9 @@ export class ConfirmValidParentMatcher implements ErrorStateMatcher {
/**
* Collection of reusable RegExps
*/
export
const
regExps
:
{
[
key
:
string
]:
RegExp
}
=
{
password
:
/^
(?=
.*
[
0-9
])(?=
.*
[
!@#$%^&*
])[
a-zA-Z0-9!@#$%^&*
]{7,15}
$/
};
//
export const regExps: { [key: string]: RegExp } = {
//
password: /^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{7,15}$/
//
};
/**
* Collection of reusable error messages
...
...
@@ -40,6 +40,6 @@ export const errorMessages: { [key: string]: string } = {
fullName
:
'
Full name must be between 1 and 128 characters
'
,
email
:
'
La forme de l
\'
adresse email doit être valide (username@domain)
'
,
confirmEmail
:
'
Les adresses email doivent être identiques
'
,
password
:
'
Password must be between 7 and 15 characters, and contain at least one number and special character
'
,
//
password: 'Password must be between 7 and 15 characters, and contain at least one number and special character',
confirmPassword
:
'
Les mots de passe doivent être identiques
'
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/app/signup/student-signup/student-signup.component.ts
+
2
−
2
View file @
0eb8deb1
...
...
@@ -5,7 +5,7 @@ import { MatSnackBar } from '@angular/material';
// import { Observable } from 'rxjs';
import
{
tap
,
mergeMap
}
from
'
rxjs/operators
'
;
import
{
Registration
,
RegistrationService
,
PersonnalData
,
PersonnalDataService
}
from
'
../core
'
;
import
{
CustomValidators
,
ConfirmValidParentMatcher
,
regExps
,
errorMessages
}
from
'
../core/customValidationModule
'
;
import
{
CustomValidators
,
ConfirmValidParentMatcher
,
errorMessages
}
from
'
../core/customValidationModule
'
;
import
{
AuthService
}
from
'
app/core
'
;
...
...
@@ -253,7 +253,7 @@ export class StudentSignupComponent implements OnInit {
passwordGroup
:
this
.
formBuilder
.
group
({
password
:
[
''
,
[
Validators
.
required
,
Validators
.
pattern
(
regExps
.
password
)
//
Validators.pattern(regExps.password)
/si l'on veut ajouter une condition au mdp (en définissant regExps dans ../core/customValidationModule.ts)
]],
confirmPassword
:
[
''
,
Validators
.
required
]
},
{
validator
:
CustomValidators
.
childrenEqual
}),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment