question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Hook Form doesnt work on React Native when using validationSchema.

See original GitHub issue

Description of the bug The React Hook form doesnt work when i use validation schema on React Native. It Shows a warning : Possible Undhandled Promise Rejection (id: 3): TypeError: undefined is not an object (evaluating 'error.inner.length')

and the validation doesnt work.

To Reproduce Steps to reproduce the behavior:

  1. Implement the react native example in the : https://react-hook-form.com/api/#ReactNative
  2. Then implement the validationSchema as in the documentation using yup.

Expected behavior It can validate the input as defined in the schema and shows error on the errors object.

Screenshots Screen Shot 2019-10-02 at 5 41 43 PM

Smartphone:

  • Device: [iPhone X]
  • OS: [iOS]
  • Version [12.1]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
galihlprakosocommented, Oct 2, 2019

thanks my bro. your lib is awesome btw! love it!

1reaction
bluebill1049commented, Oct 2, 2019

thanks i will take a look at this 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Usage - React Hook Form
React Hook Form has support for native form validation, which lets you validate ... It solves the problem where data is passed through...
Read more >
react-hook-form doesn't work validation with custom input
Since react-hook-for works with the ref of element, You need to wrap your custom component with React.forwardRef , like this:
Read more >
Unlock the Secret Power of React Hook Form - CopyCat Blog
In this article, we'll dive into getting started with React Hook Form and why the library is useful in building forms in a...
Read more >
React form validation with React Hook Form and Yup
This way I can reuse the schema code in the frontend and backend. It's exactly for all these reasons that I love working...
Read more >
Yup, you should use React Hook Form | by Evan Williams
Not because I think React took the wrong approach in how forms are implemented in React, but because it's the most challenging problem...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found