Update email validation regex

This commit is contained in:
Simon Larsen 2024-02-01 06:49:39 +00:00
parent c1b8841fb5
commit 6fbff4dcf1
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE

View File

@ -53,7 +53,7 @@ export default class Email extends DatabaseProperty {
} }
public static isValid(value: string): boolean { public static isValid(value: string): boolean {
const re: RegExp = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,9}$/i; const re: RegExp = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,10}$/i;
const isValid: boolean = re.test(value); const isValid: boolean = re.test(value);
if (!isValid) { if (!isValid) {
return false; return false;