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

Unified Diff: components/autofill/core/browser/validation.cc

Issue 2585453002: [Payments] Auto-advance to next field after typing in valid credit card with maximum digits (Closed)
Patch Set: return false if length greater than maximum valid length Created 4 years 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/android/java/src/org/chromium/chrome/browser/payments/ui/EditorTextField.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/validation.cc
diff --git a/components/autofill/core/browser/validation.cc b/components/autofill/core/browser/validation.cc
index 7efa38cc33e0c1adb0d6276fd6ba6e6509d08570..b784a2697937f8e9586e1292376ca73cf164481a 100644
--- a/components/autofill/core/browser/validation.cc
+++ b/components/autofill/core/browser/validation.cc
@@ -43,6 +43,7 @@ bool IsValidCreditCardNumber(const base::string16& text) {
// defined sizes.
// [1] http://www.merriampark.com/anatomycc.htm
// [2] http://en.wikipedia.org/wiki/Bank_card_number
+ // CardEditor.isCardNumberLengthMaxium() needs to be kept in sync.
const char* const type = CreditCard::GetCreditCardType(text);
if (type == kAmericanExpressCard && number.size() != 15)
return false;
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorTextField.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698