Index: components/autofill/core/browser/validation.h |
diff --git a/components/autofill/core/browser/validation.h b/components/autofill/core/browser/validation.h |
index a09ae75cbb3af7470832ce8306dcfdf34f1d8639..88db88bbc35fae6808cb92c30ed199e2a1538e28 100644 |
--- a/components/autofill/core/browser/validation.h |
+++ b/components/autofill/core/browser/validation.h |
@@ -7,6 +7,7 @@ |
#include "base/strings/string16.h" |
#include "base/strings/string_piece.h" |
+#include "components/autofill/core/browser/field_types.h" |
namespace base { |
class Time; |
@@ -43,6 +44,12 @@ bool IsValidZip(const base::string16& text); |
// Returns true if |text| looks like an SSN, with or without separators. |
bool IsSSN(const base::string16& text); |
+// Returns whether |value| is valid for the given |type|. If not null, |
+// |error_message| is populated when the function returns false. |
+bool IsValidForType(const base::string16& value, |
+ ServerFieldType type, |
+ base::string16* error_message); |
+ |
} // namespace autofill |
#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_VALIDATION_H_ |