Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7438)

Unified Diff: chrome/browser/ui/views/payments/validating_textfield.cc

Issue 2694693003: [Payments] Add support for required fields in editor validation (Closed)
Patch Set: addressed comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/payments/payment_request_credit_card_editor_interactive_uitest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/payments/validating_textfield.cc
diff --git a/chrome/browser/ui/views/payments/validating_textfield.cc b/chrome/browser/ui/views/payments/validating_textfield.cc
index ed8dd7d8b8403fbc09e47766f62c474bd29f4f3a..96361cc1d2c84df8b7b6ac44dfbeca4bafd2d44f 100644
--- a/chrome/browser/ui/views/payments/validating_textfield.cc
+++ b/chrome/browser/ui/views/payments/validating_textfield.cc
@@ -17,9 +17,9 @@ ValidatingTextfield::~ValidatingTextfield() {}
void ValidatingTextfield::OnBlur() {
Textfield::OnBlur();
- // The first validation of non-empty data should be on a blur. The subsequent
- // validations will occur when the contents changes.
- if (!was_validated_ && !text().empty()) {
+ // The first validation should be on a blur. The subsequent validations will
+ // occur when the content changes.
+ if (!was_validated_) {
was_validated_ = true;
Validate();
}
« no previous file with comments | « chrome/browser/ui/views/payments/payment_request_credit_card_editor_interactive_uitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698