Update regexp pour le mot de passe

This commit is contained in:
Sébastien André
2020-12-29 14:52:05 +01:00
parent f59debf36a
commit e6686cbc07
2 changed files with 2 additions and 2 deletions

View File

@@ -41,7 +41,7 @@
<input matInput type="password" formControlName="password" <input matInput type="password" formControlName="password"
[ngClass]="{ 'is-invalid': submitted && formCtrls.password.errors }" tabindex="5" /> [ngClass]="{ 'is-invalid': submitted && formCtrls.password.errors }" tabindex="5" />
<mat-error *ngIf="formCtrls.password.hasError('required')">Password is required</mat-error> <mat-error *ngIf="formCtrls.password.hasError('required')">Password is required</mat-error>
<mat-error *ngIf="formCtrls.password.hasError('pattern')">The pattern of the password ([A-Za-z0-9_-] <mat-error *ngIf="formCtrls.password.hasError('pattern')">The pattern of the password ([A-Za-z0-9_-|/]
{{ '{' }}8,15{{ '}' }})</mat-error> {{ '{' }}8,15{{ '}' }})</mat-error>
</mat-form-field> </mat-form-field>
</p> </p>

View File

@@ -37,7 +37,7 @@ export class CreateUserComponent implements OnInit {
username: ["", [Validators.required, Validators.minLength(3)]], username: ["", [Validators.required, Validators.minLength(3)]],
password: [ password: [
"", "",
[Validators.required, Validators.pattern("^[A-Za-z0-9_-]{8,15}$")] [Validators.required, Validators.pattern("^[A-Za-z0-9_-|/]{8,15}$")]
], ],
firstname: ["", [Validators.required, Validators.minLength(3)]], firstname: ["", [Validators.required, Validators.minLength(3)]],
lastname: ["", [Validators.required, Validators.minLength(3)]], lastname: ["", [Validators.required, Validators.minLength(3)]],