New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'warn' alternative to 'validate' #1780
Conversation
Current coverage is 100% (diff: 100%)@@ master #1780 diff @@
=====================================
Files 53 53
Lines 1144 1189 +45
Methods 0 0
Messages 0 0
Branches 0 0
=====================================
+ Hits 1144 1189 +45
Misses 0 0
Partials 0 0
|
// username input rerendered twice, once for value, once for sync warning | ||
expect(usernameInput.calls.length).toBe(3) | ||
|
||
// should be valid now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just realized some of these comments are nonsensical now. I could re-add the validity checks (warning should not invalidate form), or just take out the comments.
Excellent work. Can you do the same process in the docs? |
Thanks for the response!
Let me know if you need anything else. Thanks again! |
Needs to be in |
Done! |
😞 Sorry, your PR was first, but something got merged that is causing a conflict. Can you resolve? I will merge asap. |
To use, add a function warn() to reduxForm decorator. This function should be similar to validate(). Behavior will be identical, except warnings do not mark a form as invalid. Also updated tests to cover new feature. There are two odd tests marked with TODO in reduxForm.spec.js involving unexpected renders, though.
* Described usage in reduxForm.md * Added simple warning to Sync Validation example
Yep, no problem -- fixed it and pushed. (Would it be better practice to squash my four commits and add the issue number? Thanks!) |
I'm actually looking forward to this one too, always wondered why it was always black or white only. 👍 |
Thanks! 😄 |
Finally got what I was waiting for, Thank you guys. |
thanks @timhwang21 ! |
Published in |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Referencing #1779 and #1649.
To use, add a function warn() to reduxForm decorator. This function should
be similar to validate(). Behavior will be identical, except warnings do not
mark a form as invalid.
(If I missed any steps in the PR process, please let me know. Thanks!)
Also updated tests to cover new feature. There are two odd tests marked with
TODO in reduxForm.spec.js involving unexpected renders, though.