Skip to content

Conversation

@PalashChitnavis
Copy link

Title: Fix #108

Description:
used ZOD to create schema's.
all schema are in src/constants/zod-schema.tsx
instead of patternValue and patternMessage, zod's schema handles multiple cases

Screenhots (if any):

Before:
Only 1 validation message, which was passed through patternMessage
only message is :

Enter a valid email address.

image

After:
Created custom messages for all possible cases, so user knows where they're making a mistake.
messages can be:

Email must contain '@'
Email must have a domain after '@' (e.g., 'example.com')
Domain must contain a '.' (e.g., 'gmail.com')

image
image
image

Resolves #108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] : Use Zod, instead of regex

1 participant