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

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

Issue 2694693003: [Payments] Add support for required fields in editor validation (Closed)
Patch Set: 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
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..11071ca7f3a5a152eeda9361ffa425979578b5c3 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 of should be on a blur. The subsequent validations
anthonyvd 2017/02/13 15:53:53 nit: no "of"
Mathieu 2017/02/13 15:58:15 Done.
+ // will occur when the contents changes.
anthonyvd 2017/02/13 15:53:53 nit: "content changes"
Mathieu 2017/02/13 15:58:15 Done.
+ if (!was_validated_) {
was_validated_ = true;
Validate();
}

Powered by Google App Engine
This is Rietveld 408576698