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.

Async validation runs twice

See original GitHub issue

You 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:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fridayscommented, Feb 16, 2017

Thanks. VJF + chriso’s validator work great for me.

Read more comments on GitHub >

github_iconTop 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 >

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