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

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

Issue 2673753005: [Payments] Basic validation in the credit card editor. (Closed)
Patch Set: more tests Created 3 years, 10 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 a09ae75cbb3af7470832ce8306dcfdf34f1d8639..fa6f766eafefbef0ad7eecec1c8b5a870f164bdd 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,13 @@ 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 |error_message| is
+// not null and the function returns false, it is populated with the error
please use gerrit instead 2017/02/07 21:55:22 s/it/|error_message|/ (to disambiguate)
Mathieu 2017/02/08 02:03:25 reworded
+// message.
+bool IsValidForType(const base::string16& value,
+ ServerFieldType type,
+ base::string16* error_message);
+
} // namespace autofill
#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_VALIDATION_H_

Powered by Google App Engine
This is Rietveld 408576698