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

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

Issue 14148004: [Autofill] Move IsValidState() into validation.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/browser/validation.h
diff --git a/components/autofill/browser/validation.h b/components/autofill/browser/validation.h
index 618dcc139c5f785ca216122ad06447041f59a48b..eb7a6fcd8ebe63a74f4afb5c9082861c1a41e5a5 100644
--- a/components/autofill/browser/validation.h
+++ b/components/autofill/browser/validation.h
@@ -34,6 +34,10 @@ bool IsValidCreditCardSecurityCode(const base::string16& code,
// 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.
+bool IsValidState(const base::string16& text);
+
// 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