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.

Track warnings like errors

See original GitHub issue

Currently a field is either invalid or valid. In most form-heavy applications there is a grey area where a value might be outside of some “known good” parameter but not necessarily invalid, resulting in a warning that doesn’t affect form-validity but is still composed of validation functions. Extending this thinking, it’s possible that fields might have a number of meta states (with errors and warnings being just two) that can be built out of validators. One such (real-world) example is a “visibility” state: Is some condition met (or not met)? Then this field (or group of fields) should have their visibility affected.

I filed a similar issue for redux-form (which already has warnings) a while ago but have since shied away from redux-form.

I think this could be implemented in a future proof way (while retaining backwards compatibility) by introducing a new setter function and a new render prop (an object mapping validation type keys error, warning, etc. to objects of validation results).

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:30
  • Comments:34 (3 by maintainers)

github_iconTop GitHub Comments

34reactions
Jaikantcommented, Jun 26, 2019

+1 for the issue.

16reactions
vincerubinetticommented, Sep 4, 2020

Fairly big shortcoming for what is supposed to be the go-to form management library. Formik might be “very flexible” and allow you to implement this on your own. But so is vanilla html/js; I’m using a library to save time.

Pretty sure there’s enough upvotes here to say this should be more than an “enhancement”. At the very least this issue should be reopened/re-considered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

C# Compiler Options - errors and warnings - Microsoft Learn
C# Compiler Options for errors and warnings. These options suppress or enable warnings, and control warnings as errors.
Read more >
How to monitor new warnings in code generated by error ...
How to monitor new warnings in code generated by error checking tools? ... Do generic tools exist for keeping track of warnings in...
Read more >
Avoid code warnings being missed or ignored - Daily .NET Tips
While developing application often we ignored several “build warnings” and only focused on fixing the “build errors”. What does those warning means?
Read more >
Exceptions and debugging - Advanced R. - Hadley Wickham
The easiest way to track down warnings is to convert them into errors with options(warn = 2) and use the regular debugging tools....
Read more >
Tracking down errors in R - R-bloggers
In the error output, we can see there was also a warning “NAs introduced by coercion”. As we weren't expecting any warnings, let's...
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