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

issue: field does not get set to false in validatingFields when validation is triggered by trigger #11590

Closed
1 task done
tjelvar-chromaway opened this issue Mar 6, 2024 · 0 comments
Labels
status: under investigation aware of this issue and pending for investigation

Comments

@tjelvar-chromaway
Copy link

Version Number

^7

Codesandbox/Expo snack

https://codesandbox.io/p/sandbox/priceless-tdd-4xhpd9?layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clte8ekrj00063b6jyyzd3frn%2522%252C%2522sizes%2522%253A%255B70%252C30%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clte8ekrj00023b6j6tu2xlm5%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clte8ekrj00033b6jkqp9u395%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clte8ekrj00053b6j5ntveg4f%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B53.35822853444808%252C46.64177146555192%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clte8ekrj00023b6j6tu2xlm5%2522%253A%257B%2522id%2522%253A%2522clte8ekrj00023b6j6tu2xlm5%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clte8rb9z00023b6jsxngr9yh%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A6%252C%2522startColumn%2522%253A1%252C%2522endLineNumber%2522%253A6%252C%2522endColumn%2522%253A1%257D%255D%252C%2522filepath%2522%253A%2522%252Fsrc%252FApp.tsx%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clte8rb9z00023b6jsxngr9yh%2522%257D%252C%2522clte8ekrj00053b6j5ntveg4f%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clte8ekrj00043b6jyyhjntxs%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A0%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522id%2522%253A%2522clte8ekrj00053b6j5ntveg4f%2522%252C%2522activeTabId%2522%253A%2522clte8ekrj00043b6jyyhjntxs%2522%257D%252C%2522clte8ekrj00033b6jkqp9u395%2522%253A%257B%2522tabs%2522%253A%255B%255D%252C%2522id%2522%253A%2522clte8ekrj00033b6jkqp9u395%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A23.319039451114918%257D

Steps to reproduce

  1. Press Submit
  2. See that firstName is true in the validatingFields object

Expected behaviour

When trigger on a field is called and validation has finished i would expect that field to be set to false in the validatingFields object.

Furthermore, In the documentation it says that the validatingFields

Capture fields which are getting async validation.

I'm interpreting this as only fields with async validation functions could ever end up in the object but that seems not to be the case. As this is reproducible with e.g. a yup schema that uses test with an async validation function. But i may be misunderstanding its purpose.

What browsers are you seeing the problem on?

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@bluebill1049 bluebill1049 added the status: under investigation aware of this issue and pending for investigation label Mar 6, 2024
rafaelcalhau pushed a commit to rafaelcalhau/react-hook-form that referenced this issue May 5, 2024
…eact-hook-form#11613)

* 🐞 fix react-hook-form#11590 issue with trigger on validatingFields

* fix unit tests and lint error
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: under investigation aware of this issue and pending for investigation
Projects
None yet
Development

No branches or pull requests

2 participants