mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 18:30:32 -06:00
6 lines
220 B
TypeScript
6 lines
220 B
TypeScript
export const isValidEmail = (email: string): boolean => {
|
|
// This regex comes from zod
|
|
const regex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9-]*\.)+[A-Z]{2,}$/i;
|
|
return regex.test(email);
|
|
};
|