form: FormGroup = new FormGroup({
clave: new FormControl('', [Validators.required, Validators.pattern("^(?=.*?[A-Z])(?=.*?[a-z])(?=.*[0-9])(?=.*[$@$!%*?&\\.\\-\\_])[A-Za-z\d$@$!%*?&\\.\\-\\_].{7,}$")])
});
This pattern validates the strength of a password, regardless of the order in which the conditions are met.
Minimum requirements:
- A character in lowercase
- A Character in uppercase
- A number
- A special character
- Minimum 8 characters
I hope it will be you useful.
regards.
Aucun commentaire:
Enregistrer un commentaire