mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 15:24:55 +00:00
Update email validation regex
This commit is contained in:
parent
c1b8841fb5
commit
6fbff4dcf1
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user