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

Unified Diff: third_party/libaddressinput/chromium/cpp/src/rule.h

Issue 116363003: [rac] Validate an address. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 11 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: third_party/libaddressinput/chromium/cpp/src/rule.h
diff --git a/third_party/libaddressinput/chromium/cpp/src/rule.h b/third_party/libaddressinput/chromium/cpp/src/rule.h
index eab1de7454dd23ddf2a62000a262b32d6c48ea3a..9e6fa098405f8971d5c3dcec6842ae86cd7f8b97 100644
--- a/third_party/libaddressinput/chromium/cpp/src/rule.h
+++ b/third_party/libaddressinput/chromium/cpp/src/rule.h
@@ -76,12 +76,27 @@ class Rule {
// INVALID_MESSAGE_ID.
int GetAdminAreaNameMessageId() const { return admin_area_name_message_id_; }
+ // The error message string identifier for an invalid admin area. If not set,
+ // then INVALID_MESSAGE_ID.
+ int GetInvalidAdminAreaMessageId() const {
+ return invalid_admin_area_message_id_;
+ }
+
// The message string identifier for postal code name. If not set, then
// INVALID_MESSAGE_ID.
int GetPostalCodeNameMessageId() const {
return postal_code_name_message_id_;
}
+ // The error message string identifier for an invalid postal code. If not set,
+ // then INVALID_MESSAGE_ID.
+ int GetInvalidPostalCodeMessageId() const {
+ return invalid_postal_code_message_id_;
+ }
+
+ // Returns the error message string identifier for an invalid |field|.
+ int GetInvalidFieldMessageId(AddressField field) const;
+
private:
std::vector<std::vector<AddressField> > format_;
std::vector<AddressField> required_;
@@ -90,7 +105,9 @@ class Rule {
std::string language_;
std::string postal_code_format_;
int admin_area_name_message_id_;
+ int invalid_admin_area_message_id_;
int postal_code_name_message_id_;
+ int invalid_postal_code_message_id_;
DISALLOW_COPY_AND_ASSIGN(Rule);
};

Powered by Google App Engine
This is Rietveld 408576698