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

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

Issue 2713873002: [Payments] Add validation for unsupported credit card types in editor. (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
Index: components/autofill/core/browser/validation.h
diff --git a/components/autofill/core/browser/validation.h b/components/autofill/core/browser/validation.h
index 88db88bbc35fae6808cb92c30ed199e2a1538e28..0b496e2b950aa933706e6b6699d4205ba30bf644 100644
--- a/components/autofill/core/browser/validation.h
+++ b/components/autofill/core/browser/validation.h
@@ -30,11 +30,19 @@ bool IsValidCreditCardNumber(const base::string16& text);
bool IsValidCreditCardSecurityCode(const base::string16& code,
const base::StringPiece card_type);
+// Returns true if |text| is a supported card type and a valid credit card
+// number. |error_message| can't be null and will be filled with the appropriate
+// error message.
+bool IsValidCreditCardNumberForBasicCardNetworks(
+ const base::string16& text,
+ const std::set<std::string>& supported_basic_card_networks,
+ base::string16* error_message);
+
// Returns true if |text| looks like a valid e-mail address.
bool IsValidEmailAddress(const base::string16& text);
-// Returns true if |text| is a valid US state name or abbreviation. It is
-// case insensitive. Valid for US states only.
+// Returns true if |text| is a valid US state name or abbreviation. It is case
+// insensitive. Valid for US states only.
bool IsValidState(const base::string16& text);
// Returns true if |text| looks like a valid zip code.

Powered by Google App Engine
This is Rietveld 408576698