Handling forms in react native is a crucial task in your journey as a react native developer, you canβt think about developing a new react native a...
For further actions, you may consider blocking this person and/or reporting abuse
I have also tried to unit test validations, but that doesn't work. The validation is skipped when I submit the whole form in tests.
Do you know if there is anyway how I can trigger the validations in form?
you can use
triggerValidation
function : react-hook-form.com/api#triggerVal...I have tried to implement it with the latest react-hook-form, but it doesn't work. Looks like the problem is with 5.5.2 release github.com/react-hook-form/react-h...
Hmm, Yeah look like we have an issue with version 5.5.2 and we need to to register inputs using
useEffect
.thank you for your help, will try to fix it ASAP
Fixed
First, thanks for the idea of a wrapper for forms with react native!
I tried your fixed version and came to the same resolution, that the validation isn't working well.
Example:
Enter the following values on your prototype (snack.expo.io/@yjose/form-in-react...
Name: asdf
Email: asdf -> then correct to aasdf@gmail.com
Password: anything you want
-> submit
Result: all fields are invalid :-( Hopefully you can help me out
please check Now, the demo example is working as expected ( look like the new
react-hook-form
have some breaking changes )dev-to-uploads.s3.amazonaws.com/i/...
I dont get it actually :(, any help ?
Also, I am getting this error :(
Warning: Each child in a list should have a unique "key" prop. See fb.me/react-warning-keys for more information.
If anyone is able to transpile this over to version 7 syntax.. (if that's even possible).. that would be awesome.
Seems like ValidationOptions is not available anymore in the latest version for "react-hook-form": "^6.11.0" ?
I believe its called ValidationRules now instead .. werido !
Hi, can you convert this code to
JS
because i don't understandTS
Form with basic input is easily doable, but using picker, checkbox, radio button is real challenge.