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.

Typing in FormsyText doesn't update Form validity

See original GitHub issue

If I have a FormsyText with required=true then typing in the text field does not fire the form’s onValid() and form.state.isValid is false. On when the text field blurs do these update.

So at the moment I can’t enable and disable the form’s submit button based on the form being valid.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:37

github_iconTop GitHub Comments

1reaction
krizkacommented, May 30, 2016

Hello there. Sorry for a long silence. My workaround looks like this gist https://gist.github.com/krizka/6be5cd3fd1a200f1dba9de6363dbe63d . Just put it in your project and import instead of FormsyText. I use debouncing here to validate values on input change. Unfortunately, verification on every change is slow, so debouncing helps. @damonmaria I noticed performance problems on mobiles, for which it was made. So debouncing helped here.

0reactions
lefnirecommented, Sep 23, 2016

@stupidisum in a pinch you can add a bit to your own package.json to run this module’s build step before your own, see my diff example

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular - FormControl does not update when typing in input
You do need a FormControl input. If you are using Reactive Forms, you set the value and validators in the component class, not...
Read more >
Client-side form validation - Learn web development | MDN
Using built-in form validation · type : Specifies whether the data needs to be a number, an email address, or some other specific...
Read more >
Custom Form Validators • Angular - codecraft.tv
A validator in Angular is a function which returns null if a control is valid or an error object if it's invalid. For...
Read more >
Angular Forms and Validations
We created this angular forms tutorial to help you learn everything about Angular forms validations in angular apps. These angular forms ...
Read more >
Angular Custom Form Validators: Complete Guide
A validator function returns true if the form field is valid according to the validator rules, or false otherwise. A validator can be...
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