OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_AUTOFILL_BROWSER_VALIDATION_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_VALIDATION_H_ |
6 #define COMPONENTS_AUTOFILL_BROWSER_VALIDATION_H_ | 6 #define COMPONENTS_AUTOFILL_BROWSER_VALIDATION_H_ |
7 | 7 |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
(...skipping 16 matching lines...) Expand all Loading... |
27 bool IsValidCreditCardSecurityCode(const base::string16& text); | 27 bool IsValidCreditCardSecurityCode(const base::string16& text); |
28 | 28 |
29 // Returns true if |code| looks like a valid credit card security code | 29 // Returns true if |code| looks like a valid credit card security code |
30 // for the type of credit card designated by |number|. | 30 // for the type of credit card designated by |number|. |
31 bool IsValidCreditCardSecurityCode(const base::string16& code, | 31 bool IsValidCreditCardSecurityCode(const base::string16& code, |
32 const base::string16& number); | 32 const base::string16& number); |
33 | 33 |
34 // Returns true if |text| looks like a valid e-mail address. | 34 // Returns true if |text| looks like a valid e-mail address. |
35 bool IsValidEmailAddress(const base::string16& text); | 35 bool IsValidEmailAddress(const base::string16& text); |
36 | 36 |
| 37 // Returns true if |text| is a valid US state name or abbreviation. It is |
| 38 // case insensitive. Valid for US states only. |
| 39 bool IsValidState(const base::string16& text); |
| 40 |
37 // Returns true if |text| looks like a valid zip code. | 41 // Returns true if |text| looks like a valid zip code. |
38 // Valid for US zip codes only. | 42 // Valid for US zip codes only. |
39 bool IsValidZip(const base::string16& text); | 43 bool IsValidZip(const base::string16& text); |
40 | 44 |
41 } // namespace autofill | 45 } // namespace autofill |
42 | 46 |
43 #endif // COMPONENTS_AUTOFILL_BROWSER_VALIDATION_H_ | 47 #endif // COMPONENTS_AUTOFILL_BROWSER_VALIDATION_H_ |
OLD | NEW |