mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 06:23:34 -07:00
simplify email validator #261
This commit is contained in:
parent
dc9a47872e
commit
93890bb93d
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ export const validators = {
|
||||||
return {
|
return {
|
||||||
emailRule: v =>
|
emailRule: v =>
|
||||||
!v ||
|
!v ||
|
||||||
/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) ||
|
/^[^@\s]+@[^@\s.]+.[^@.\s]+$/.test(v) ||
|
||||||
this.$t('user.e-mail-must-be-valid'),
|
this.$t('user.e-mail-must-be-valid'),
|
||||||
|
|
||||||
existsRule: value => !!value || this.$t('general.field-required'),
|
existsRule: value => !!value || this.$t('general.field-required'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue