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
I use zodResolver in my form and as a result - all field-level validators get ignored.
Yet I cannot validate my field in the resolver because it's a phone-mask field and only IT knows when it's ok.
So I have to use field-level validation. But it doesn't even get invoked.
It is my understanding, that the resolver validates the form. It might not know the specifics of a particular field.
To complete it, field validators should be triggered first and then proceed to the resolver.
Is there maybe an option that enables field validators?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I use zodResolver in my form and as a result - all field-level validators get ignored.
Yet I cannot validate my field in the resolver because it's a phone-mask field and only IT knows when it's ok.
So I have to use field-level validation. But it doesn't even get invoked.
Here is a sandbox demonstrating this problem:
https://stackblitz.com/edit/stackblitz-starters-bskxpu?file=src%2FForm.tsx
As you see, "Validation" text doesn't appear.
How can I still validate my field?
It is my understanding, that the resolver validates the form. It might not know the specifics of a particular field.
To complete it, field validators should be triggered first and then proceed to the resolver.
Is there maybe an option that enables field validators?
Beta Was this translation helpful? Give feedback.
All reactions