Browse Source

feat(gui-v2): add email validation helper

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
pull/2716/head
Braks 2 years ago committed by Pranav C
parent
commit
dd0402e3b8
  1. 2
      packages/nc-gui-v2/nuxt-shim.d.ts
  2. 2
      packages/nc-gui-v2/utils/validation.ts

2
packages/nc-gui-v2/nuxt-shim.d.ts vendored

@ -10,7 +10,7 @@ declare module '#app/nuxt' {
emit: (event: string, data: any) => void
}
// tele.emit
$e: (event: string, data: any) => void
$e: (event: string, data?: any) => void
$state: RemovableRef<GlobalState>
}
}

2
packages/nc-gui-v2/utils/validation.ts

@ -0,0 +1,2 @@
export const isEmail = (v: string) =>
/^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@(([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,})$/i.test(v)
Loading…
Cancel
Save