2
0
Files
bot/packages/bot-engine/blocks/inputs/email/validateEmail.ts

5 lines
245 B
TypeScript
Raw Normal View History

2022-11-29 10:02:40 +01:00
const emailRegex =
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
2022-11-29 10:02:40 +01:00
export const validateEmail = (email: string) => emailRegex.test(email)