Skip to content
Snippets Groups Projects
Commit 31193b7a authored by Antonin COQUET's avatar Antonin COQUET
Browse files

fix: update regex of password and email to handle hyphen

parent afe3e97d
No related branches found
No related tags found
3 merge requests!178release V1.10.0,!154Dev,!138fix: update regex of password and email to handle hyphen
......@@ -2,11 +2,11 @@ export class CustomRegExp {
/**
* Validate a password (at least 8 characters, 1 uppercase letter, 1 lowercase letter, 1 number, and 1 special character)
*/
public static readonly PASSWORD: RegExp = /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/; //NOSONAR
public static readonly PASSWORD: RegExp = /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[-!@#$%^&*])(?=.{8,})/; //NOSONAR
/**
* Validate an email
*/
public static readonly EMAIL: RegExp = /^[a-z0-9.-_]+@[a-z0-9.-]+[.][a-z]{2,3}/; //NOSONAR
public static readonly EMAIL: RegExp = /^[a-z0-9.\-_]+@[a-z0-9.-]+[.][a-z]{2,3}/; //NOSONAR
public static readonly TEXT_WITHOUT_NUMBER: RegExp = /^[A-Za-zÀ-ÖØ-öø-ÿ- ]{1,}$/; //NOSONAR
/**
* Validate a password (at least 8 characters, 1 uppercase letter, 1 lowercase letter, 1 number, and 1 special character)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment