update du code

This commit is contained in:
Vincent BENOIT
2022-10-07 17:17:38 +02:00
parent 194a2f51f1
commit eb1bfbf85c
13 changed files with 12483 additions and 176 deletions

View File

@@ -1,15 +1,39 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators, ValidatorFn, ValidationErrors, AbstractControl } from '@angular/forms';
import { Router } from '@angular/router';
import { BackendService } from '../../../../services/backend/backend.service';
import { ToastrService } from 'ngx-toastr';
@Component({
selector: 'app-parametres',
templateUrl: './parametres.component.html',
styleUrls: ['./parametres.component.css']
selector: 'app-parametres',
templateUrl: './parametres.component.html',
styleUrls: ['./parametres.component.css']
})
export class ParametresComponent implements OnInit {
paramsFG:FormGroup;
submitted:boolean=false;
Pw:number = 10;
constructor() { }
constructor(private fb:FormBuilder,
private bs:BackendService,
private router:Router,
private toast:ToastrService) { }
ngOnInit(): void {
}
ngOnInit(): void {
this.paramsFG=this.fb.group({
pin:["", [
Validators.required,
Validators.pattern('(?=\\D*\\d)(?=[^a-z])(?=[^A-Z]*[A-Z]).{' + this.Pw + '}')
]],
num_accepted:["", [
Validators.required,
Validators.pattern('(?=\\D*\\d)(?=[^a-z])(?=[^A-Z]*[A-Z]).{' + this.Pw + '}'),
]],
});
}
onUpdate(): void {
}
}