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

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

Issue 2849523003: Add billing address as a mandatory field of Payments credit cards. (Closed)
Patch Set: Added AddressComboboxModel unittests and fixed more compile issues. Created 3 years, 8 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.cc
diff --git a/components/autofill/core/browser/validation.cc b/components/autofill/core/browser/validation.cc
index cbab098922462f26923b3cfa2230f9f614014696..9fb969f3a285f8cd7cbd21d9c854b4aad26973fc 100644
--- a/components/autofill/core/browser/validation.cc
+++ b/components/autofill/core/browser/validation.cc
@@ -141,6 +141,10 @@ CreditCardCompletionStatus GetCompletionStatusForCard(
status |= CREDIT_CARD_NO_CARDHOLDER;
}
+ if (card.billing_address_id().empty()) {
sebsg 2017/05/02 22:58:55 This would be a bit more involved but we might wan
MAD 2017/05/03 16:15:19 Done.
+ status |= CREDIT_CARD_NO_BILLING_ADDRESS;
+ }
+
return status;
}
@@ -156,6 +160,9 @@ base::string16 GetCompletionMessageForCard(CreditCardCompletionStatus status) {
case CREDIT_CARD_NO_NUMBER:
return l10n_util::GetStringUTF16(
IDS_PAYMENTS_CARD_NUMBER_INVALID_VALIDATION_MESSAGE);
+ case CREDIT_CARD_NO_BILLING_ADDRESS:
+ return l10n_util::GetStringUTF16(
+ IDS_PAYMENTS_CARD_BILLING_ADDRESS_REQUIRED);
default:
// Multiple things are missing
return l10n_util::GetStringUTF16(IDS_PAYMENTS_MORE_INFORMATION_REQUIRED);

Powered by Google App Engine
This is Rietveld 408576698