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.

Validity of the form is not exposed in any way.

See original GitHub issue

Improvement: Given that a developer might want to access the validity of the form as a whole, without having to submit the form, I think it would be a huge plus to provide another output for the form component.

Something like a (onErrorsChange)="myHandler($event)"

With this, just adding one property and a line of code (copy the behavior of onChanges), we would enable the user to receive the errors that exist in the form, or the absence of them.

EDIT: I’d be happy to provide a PR for this during my free time 😃

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
fbessoucommented, Jun 14, 2017

I agree (onErrorsChange)="myHandler($event)" would be the way to do. If someone wants to implement it and make a PR before feel free ! I am very busy this week, but I can take a look next week if needed.

2reactions
TimjeKnightcommented, Apr 13, 2017

I managed a little workaround inside an action button ->

     {
        'submit': (form, options) => {
            // check if valid. if so, continue
            let formValid = true;
            form.forEachChildRecursive(child => {
                if (!child.valid) formValid = false;
            });
            if (formValid) {
                this.next();
            }
     }
Read more comments on GitHub >

github_iconTop Results From Across the Web

I use jQuery to alter the exposed form select options. Got error
In this way, the form element would not have #needs_validation set to TRUE , and Drupal would not check the returned value for...
Read more >
Threats to validity of Research Design
Internal validity refers specifically to whether an experimental treatment/condition makes a difference or not, and whether there is sufficient evidence to ...
Read more >
Recommended Informed Consent Language for Data Sharing
Concern 6. The informed consent and, therefore, the authorization to use information (i.e., research data) expire, e.g., "Only valid while the study is...
Read more >
Validation · Bootstrap v5.0
Bootstrap scopes the :invalid and :valid styles to parent .was-validated class, usually applied to the <form> . Otherwise, any required field without a...
Read more >
Experiment Basics – Research Methods in Psychology
An empirical study is said to be high in internal validity if the way it was conducted supports the conclusion that the independent...
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