|
|
@ -4,7 +4,7 @@ import { |
|
|
|
Form, |
|
|
|
Form, |
|
|
|
computed, |
|
|
|
computed, |
|
|
|
extractSdkResponseErrorMsg, |
|
|
|
extractSdkResponseErrorMsg, |
|
|
|
isEmail, |
|
|
|
validateEmail, |
|
|
|
message, |
|
|
|
message, |
|
|
|
ref, |
|
|
|
ref, |
|
|
|
useCopy, |
|
|
|
useCopy, |
|
|
@ -52,7 +52,7 @@ const validators = computed(() => { |
|
|
|
callback('Email is required') |
|
|
|
callback('Email is required') |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
const invalidEmails = (value || '').split(/\s*,\s*/).filter((e: string) => !isEmail(e)) |
|
|
|
const invalidEmails = (value || '').split(/\s*,\s*/).filter((e: string) => !validateEmail(e)) |
|
|
|
if (invalidEmails.length > 0) { |
|
|
|
if (invalidEmails.length > 0) { |
|
|
|
callback(`${invalidEmails.length > 1 ? ' Invalid emails:' : 'Invalid email:'} ${invalidEmails.join(', ')} `) |
|
|
|
callback(`${invalidEmails.length > 1 ? ' Invalid emails:' : 'Invalid email:'} ${invalidEmails.join(', ')} `) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|