react-hook-form / resolvers

📋 Validation resolvers: Yup, Zod, Superstruct, Joi, Vest, Class Validator, io-ts, Nope, computed-types, typanion, Ajv, TypeBox, ArkType, Valibot, effect-ts and VineJS
https://react-hook-form.com/
MIT License
1.77k stars 161 forks source link

Email Validation Bug #704

Open kamau-n opened 3 months ago

kamau-n commented 3 months ago

Describe the bug During email validation , we are facing the following issue Case Example Email : test.myemail@gmail.com

The following email does not pass validation. Error : Invalid Email

To Reproduce

  1. Create a signup form which used zod validation for the above email

  2. Define a rules for the email as follows

export const registerRules = z.object({ username: z.string().min(1, "Username is Required"), email: z.string().min(1, "Email is Required").email("Email is Invalid"), })

  1. Trying to validate the above provided email.
  2. Error : Email Validation Fails , Message(Invalid Email)

Expected behavior Emails with special characters such as (.) to validate during signup.

Desktop (please complete the following information):

Smartphone (please complete the following information):