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've been working on a project recently that uses Formik and was fixing a bug where a form with a custom validation function we were using (which gets passed in as the validate prop on the Formik component) was saying that invalid data was valid. It transpired that this was caused by our custom validation creating an uncaught exception, which has now been fixed.
The surprising thing I found though was that Formik never appeared to do anything with that uncaught exception; instead it just tolerated the error and carried on as if nothing happened (presumably because nothing was returned so there were no 'errors' as such). I'm not quite sure if this is intended or not? I would perhaps have expected either Formik just to completely error out or fail the validation in some way to prevent submission. It just seems a bit counter-intuitive? It would be nice to have an explanation as to why the uncaught exception is handled this way if this is intentional just for future reference.
Side note: Love the library by the way. Been using it for the best part of two years and it's so much better than standard forms.
Toby
The text was updated successfully, but these errors were encountered:
❓Question
Hi all,
I've been working on a project recently that uses Formik and was fixing a bug where a form with a custom validation function we were using (which gets passed in as the validate prop on the Formik component) was saying that invalid data was valid. It transpired that this was caused by our custom validation creating an uncaught exception, which has now been fixed.
The surprising thing I found though was that Formik never appeared to do anything with that uncaught exception; instead it just tolerated the error and carried on as if nothing happened (presumably because nothing was returned so there were no 'errors' as such). I'm not quite sure if this is intended or not? I would perhaps have expected either Formik just to completely error out or fail the validation in some way to prevent submission. It just seems a bit counter-intuitive? It would be nice to have an explanation as to why the uncaught exception is handled this way if this is intentional just for future reference.
Side note: Love the library by the way. Been using it for the best part of two years and it's so much better than standard forms.
Toby
The text was updated successfully, but these errors were encountered: