-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Disable the submit button if required form fields are not filled out #4272
Conversation
} | ||
|
||
/** | ||
* @returns {Boolean} | ||
*/ | ||
validate() { | ||
if (!this.state.password.trim()) { |
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.
Should we leave these in?
B/c the button will be disabled, but what if someone hits return or "Done" on mobile or whatever, won't that still submit the form and bypass the button being disabled?
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.
Basically I don't think we should rely on the button being enabled/disabled as a sign that the input is valid or not.
This reverts commit 8b291cc.
@madmax330 Thanks so much for the review! I reverted the commit that removed the duplicate checks, should be good for another look! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging in version: 1.0.81-5🚀
|
🚀 Deployed to production in version: 1.0.82-7🚀
|
Details
See issue for more context.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/171673
Tests/QA
<baseURL>/bank-account/company
.Tested On
Screenshots
N/A