Browse Source

fix(gui): email validation correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4459/head
Pranav C 2 years ago
parent
commit
0c78030fbe
  1. 4
      packages/nc-gui/components/account/UsersModal.vue

4
packages/nc-gui/components/account/UsersModal.vue

@ -4,7 +4,7 @@ import {
Form,
computed,
extractSdkResponseErrorMsg,
isEmail,
validateEmail,
message,
ref,
useCopy,
@ -52,7 +52,7 @@ const validators = computed(() => {
callback('Email is required')
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) {
callback(`${invalidEmails.length > 1 ? ' Invalid emails:' : 'Invalid email:'} ${invalidEmails.join(', ')} `)
} else {

Loading…
Cancel
Save