Async validation runs twice
See original GitHub issueYou can see this in the demo, uncomment the console.log
statement here:
https://github.com/foxhound87/mobx-react-form-demo/blob/master/src/forms/extension/_.async.js#L12
console.log('Loading promised data...');
When the value changes, it happens twice:
Loading promised data...
Loading promised data...
Any ideas?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Async validators called twice, first for fails and then again ...
In this scenario the validation test runs only once, when calling to fails() . The problem arises when Async Validators are present.
Read more >Form - Async validation is being called multiple times
if the form is valid, we are making server-side call to save the form, which is again causing async validator to be called...
Read more >Async validation is triggered multiple times on form. ...
You instantiate the form -> the validator is fired, triggering a request. You patchData() in setValue() -> the validator is triggered again.
Read more >Async child workflow is being called twice
Async child workflow is being called twice ... The best way to validate this is to look at the workflow execution history through...
Read more >Validation Chain API - express-validator
Runs the current validation chain in an imperative way. app.post('/create-user', async (req, res, next) => { await ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks. VJF + chriso’s validator work great for me.
Fixed here: https://github.com/foxhound87/mobx-react-form/commit/005d04c7