| 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 CHROME_BROWSER_AUTOFILL_VALIDATION_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_VALIDATION_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_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 autofill { | 10 namespace autofill { |
| 11 | 11 |
| 12 // Returns true if |text| looks like a valid credit card number. | 12 // Returns true if |text| looks like a valid credit card number. |
| 13 // Uses the Luhn formula to validate the number. | 13 // Uses the Luhn formula to validate the number. |
| 14 bool IsValidCreditCardNumber(const string16& text); | 14 bool IsValidCreditCardNumber(const string16& text); |
| 15 | 15 |
| 16 // Returns true if |text| looks like a valid credit card security code. | 16 // Returns true if |text| looks like a valid credit card security code. |
| 17 bool IsValidCreditCardSecurityCode(const string16& text); | 17 bool IsValidCreditCardSecurityCode(const string16& text); |
| 18 | 18 |
| 19 // Returns true if |text| looks like a valid e-mail address. | 19 // Returns true if |text| looks like a valid e-mail address. |
| 20 bool IsValidEmailAddress(const string16& text); | 20 bool IsValidEmailAddress(const string16& text); |
| 21 | 21 |
| 22 // Returns true if |text| looks like a valid zip code. | 22 // Returns true if |text| looks like a valid zip code. |
| 23 // Valid for US zip codes only. | 23 // Valid for US zip codes only. |
| 24 bool IsValidZip(const string16& text); | 24 bool IsValidZip(const string16& text); |
| 25 | 25 |
| 26 } // namespace autofill | 26 } // namespace autofill |
| 27 | 27 |
| 28 #endif // CHROME_BROWSER_AUTOFILL_VALIDATION_H_ | 28 #endif // COMPONENTS_AUTOFILL_BROWSER_VALIDATION_H_ |
| OLD | NEW |