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

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

Issue 2773383002: [Payments] In shipping address editor, enable required + phone validation. (Closed)
Patch Set: addressed comment Created 3 years, 9 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 0b496e2b950aa933706e6b6699d4205ba30bf644..497aeb2f00d10e5387c8e54b1e481e41bd6dcb96 100644
--- a/components/autofill/core/browser/validation.h
+++ b/components/autofill/core/browser/validation.h
@@ -45,6 +45,11 @@ bool IsValidEmailAddress(const base::string16& text);
// insensitive. Valid for US states only.
bool IsValidState(const base::string16& text);
+// Returns whether the number contained in |text| is valid for the specified
+// |country_code|. Callers should cache the result as the parsing is expensive.
+bool IsValidPhoneNumber(const base::string16& text,
+ const std::string& country_code);
+
// Returns true if |text| looks like a valid zip code.
// Valid for US zip codes only.
bool IsValidZip(const base::string16& text);

Powered by Google App Engine
This is Rietveld 408576698