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.

TypeError with validationDebounceOptions

See original GitHub issue

I’ve stumbled over something when setting the Form option validationDebounceOptions.leading to false to start validating after I’ve entered most of the field data.

When submitting the form, I receive the following error:

Form.js:302 Uncaught TypeError: Cannot read property 'then' of undefined

When I submit the form a second time, it just works. I’m not sure if I’m just doing something wrong or if this is actually a bug. Setting leading to true (default value), everything works fine.

I’m running on v 1.20.5.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
foxhound87commented, Apr 1, 2017

Now we have new showErrorsOnBlur option which is true by default (It’s the new default behavior of the library).

showErrorsOnChange is now false by default.

The errors on validate() are now NOT shown by default.

The errors can be shown anyway using validate({ showErrors: true }) but now there is more control over the errors also using field.showErrors().

Let me know if you encounter some issues, thanks.

3reactions
adlkcommented, Apr 1, 2017

i just upgraded and gave it a super quick test and it works like a charm! Keep up the great work! 🙌

Read more comments on GitHub >

github_iconTop Results From Across the Web

debounce react-jsonschema-form validate function
I have a functional component that's using react-jsonschema-form , and I need to debounce the function that it runs to validate itself.
Read more >
Validation chain order · Issue #851 · jquense/yup
When I finally got it to work, after meeting all previous validations in a sequence, they wouldn't validate as true until the debounced...
Read more >
Angular Reactive Forms: Tips and Tricks
We can tell Angular that we only want to run the validation function upon submit or blur . As we saw, the default...
Read more >
Lodash _.debounce() Method
When the leading and the trailing options are true, then func is called on the trailing edge of the timeout if and only...
Read more >
jQuery throttle / debounce: Sometimes, less is more!
jQuery throttle / debounce allows you to rate-limit your functions in multiple useful ways. Passing a delay and callback to $.throttle ...
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