Skip to content
Snippets Groups Projects
Commit 0eb8deb1 authored by felivigneau's avatar felivigneau
Browse files

mise en commentaire de la condition sur le mdp

parent 12651182
No related branches found
No related tags found
2 merge requests!70Test new form,!71Add context sheet for visits, frontend
......@@ -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
......@@ -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 }),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment