Index: chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc |
diff --git a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc |
index d0c10544c923c7d38cb9b4ac70d623534cc5e6a3..d857a944f0cceacb3e30223a8ec69131d665b3a4 100644 |
--- a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc |
+++ b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc |
@@ -204,9 +204,11 @@ bool CreditCardEditorViewController::ValidateModelAndSave() { |
locale); |
} |
- // TODO(mathp): Display global error message. |
- if (!credit_card.IsValid()) |
+ // TODO(crbug.com/711365): Display global error message. |
+ if (autofill::GetCompletionStatusForCard(credit_card, locale) != |
+ autofill::CREDIT_CARD_COMPLETE) { |
return false; |
+ } |
if (!credit_card_to_edit_) { |
// Add the card (will not add a duplicate). |