Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate number with required #9571

Closed
1 task done
bluebill1049 opened this issue Dec 10, 2022 · 2 comments
Closed
1 task done

validate number with required #9571

bluebill1049 opened this issue Dec 10, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@bluebill1049
Copy link
Member

  ### Version Number

7.40.0

Codesandbox/Expo snack

https://codesandbox.io/s/react-hook-form-tabs-problems-01-required-numbers-kmy5jp?file=%2Fsrc%2FApp.tsx

Steps to reproduce

  1. Go to https://codesandbox.io/s/react-hook-form-tabs-problems-01-required-numbers-kmy5jp?file=%2Fsrc%2FApp.tsx
  2. Click on submit (without clicking on any other tabs)
  3. Look at console log
  4. You should see errors {prop2: Object, prop3: Object}

Expected behaviour

Form should submit without any errors since the default values have been provided for all required inputs. The exact same thing but with "text" inputs works as expected and submits the form with all data from defaultValues and no errors as can be seen in this sandbox: https://codesandbox.io/s/react-hook-form-tabs-problems-01-required-strings-9btufh?file=%2Fsrc%2FApp.tsx.

What browsers are you seeing the problem on?

Firefox, Chrome, Edge

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Originally posted by @elieven in #9568

@bluebill1049 bluebill1049 added bug Something isn't working status: under investigation aware of this issue and pending for investigation and removed bug Something isn't working labels Dec 10, 2022
@bluebill1049 bluebill1049 changed the title ### Version Number validate number with required Dec 10, 2022
@bluebill1049 bluebill1049 added bug Something isn't working and removed status: under investigation aware of this issue and pending for investigation labels Dec 11, 2022
@elieven
Copy link

elieven commented Dec 11, 2022

Lovely to see the fix. Any idea when a release with it included might be available?

@bluebill1049
Copy link
Member Author

next week.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants