Showing
1 changed file
with
1 additions
and
1 deletions
@@ -58,7 +58,7 @@ export const phoneRule: Rule[] = [ | @@ -58,7 +58,7 @@ export const phoneRule: Rule[] = [ | ||
58 | export const emailRule: Rule[] = [ | 58 | export const emailRule: Rule[] = [ |
59 | { | 59 | { |
60 | validator: (_, value: string) => { | 60 | validator: (_, value: string) => { |
61 | - const reg = /^[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/; | 61 | + const reg = /^\w{3,}(\.\w+)*@[A-z0-9]+(\.[A-z]{2,5}){1,2}$/; |
62 | if (!value) { | 62 | if (!value) { |
63 | return Promise.resolve(); | 63 | return Promise.resolve(); |
64 | } else if (!reg.test(value)) { | 64 | } else if (!reg.test(value)) { |