colinhacks / zod

TypeScript-first schema validation with static type inference

Home Page:https://zod.dev

Repository from Github https://github.comcolinhacks/zodRepository from Github https://github.comcolinhacks/zod

E-Mail address format issue needs to be fixed

GitHubKaan opened this issue · comments

commented

Emails with a dash symbol will not be accepted by .email.

E. g. hello-friend@google.com will not work, but is a valid email address.
Pls fix.

SRY deleted the fork, just add this into src/types.ts:

/^(?!.)(?!...)([A-Z0-9_'+-.])[A-Z0-9_+-]@([A-Z0-9][A-Z0-9-]*.)+[A-Z]{2,}$/i;

Thx

commented

Actually works.