You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like thus to be able to then pass the zod email regex pattern to the html pattern attribute, so then the browser can be in charge of not submitting the form if invalid, showing the appropriate error, etc. Otherwise, we have to call onSubmit, with zod.SafeParse and if not success manually set/show the error on the input.
Thank you.
The text was updated successfully, but these errors were encountered:
Could the string email regex pattern be exported?
Or accessed somehow by passing
zod.string().email()
as param?Motivation:
html input of
type="email"
is more permissive thanzod email
, alloing for examplea@b
, which zod does not allow.Html input has the
pattern
attribute.We would like thus to be able to then pass the zod email regex pattern to the html pattern attribute, so then the browser can be in charge of not submitting the form if invalid, showing the appropriate error, etc. Otherwise, we have to call
onSubmit
, withzod.SafeParse
and if not success manually set/show the error on the input.Thank you.
The text was updated successfully, but these errors were encountered: