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.

Add isValidating by field

See original GitHub issue

Is your feature request related to a problem? Please describe. I implement a spinner when the field is validating. I use isValidating from formState and this will trigger loading for every fields.

Describe the solution you’d like We need isValidating from fieldState the same as isDirty, it could be trigger by field, and we should have isValidatingFields in case of we don’t use Controller.

Describe alternatives you’ve considered At the moment, I have to use trigger and implement isValidatingFields using React State. When I manually trigger the validation, I will setState the field.

Additional context This is my UI screenshot when doing this feature. image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:15
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
davbritocommented, Sep 7, 2021

This is a feature that I definitely would like to see in RHF soon. 👍🏽

3reactions
thenanocommented, May 26, 2022

I would also love this feature. In my case, I use a yup schema with the yup resolver and an async api call to validate the field (specifically we check if the handle is available or not). I want to explicitly set a message below the field only when that field is validating, not when the rest of the form is validating, and since yup handles the validation it’s pretty tricky to add this as a local state.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jQuery validation plugin is validating only specific form fields
I have downloaded the code from the internet and this is the only field I have added.I am using Xampp, Things became even...
Read more >
useFormState - Simple React forms validation
isValidating, boolean, Set to true during validation. errors, object, An object with field errors. There is also an ErrorMessage component to retrieve error ......
Read more >
Client Side Field Validation - Ninja Forms Developer Resources
First, we will look at getting setup for validating a custom field, ... If validation fails, then we need to add an error...
Read more >
API Reference - Formik
To learn more about what happens with isValidating during the submission process, ... 6 /** map of field names to **whether** the field...
Read more >
Synchronous and asynchronous input validation with ag-Grid
We do this by adding metadata to our row data for the fields we ... For this we add an extra metadata boolean...
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