Form client side validation #2678
Replies: 2 comments
-
|
For now, you have two options:
|
Beta Was this translation helpful? Give feedback.
-
|
@SantosVilanculos Thanks for the answer. Your first option is exactly what I did, though on the And indeed, laravel/precognition might be a solution but not officially supported yet 😕 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello 👋,
I'm trying to create a wrapper around
useFormfrom@inertiajs/reactbut I'm having a bit of trouble understanding how to wrap around the typings which feels restrictive 🤔I'm using
yupas the validation library.Here is the code I have:
Problem is the
setErrorcall complainsFormDataErroris not assignable toFormDataErrors.I've tried transforming :
But then it complains that {} does not match the
FormDataErrors<T>type.I'm kinda stuck with this and although the code works, I'd like to get rid of the type assertion if possible.
Does anyone has an idea ? 🤔
Beta Was this translation helpful? Give feedback.
All reactions