| Index: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| index a32f09bed4b50e5f1b7107cc5eccc79633d28c48..a4341f9b481e75ba2db55757295101a04fa2fa34 100644
|
| --- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| @@ -431,11 +431,33 @@ void AutofillDialogControllerImpl::EditClickedForSection(
|
|
|
| bool AutofillDialogControllerImpl::InputIsValid(AutofillFieldType type,
|
| const string16& value) {
|
| - // TODO(groby): Add the missing checks.
|
| switch (type) {
|
| + case EMAIL_ADDRESS:
|
| + // TODO(groby): Add the missing check.
|
| + break;
|
| +
|
| case CREDIT_CARD_NUMBER:
|
| return autofill::IsValidCreditCardNumber(value);
|
| + case CREDIT_CARD_NAME:
|
| + break;
|
| + case CREDIT_CARD_EXP_MONTH:
|
| + case CREDIT_CARD_EXP_4_DIGIT_YEAR:
|
| + NOTREACHED(); // Validation is not called for <select>
|
| + break;
|
| + case CREDIT_CARD_VERIFICATION_CODE:
|
| + return autofill::IsValidCreditCardSecurityCode(value);
|
| +
|
| + case ADDRESS_HOME_LINE1:
|
| + break;
|
| + case ADDRESS_HOME_LINE2:
|
| + return true; // Line 2 is optional - always valid.
|
| + case ADDRESS_HOME_CITY:
|
| + case ADDRESS_HOME_STATE:
|
| + case ADDRESS_HOME_ZIP:
|
| + break;
|
| +
|
| default:
|
| + NOTREACHED(); // Trying to validate unknown field.
|
| break;
|
| }
|
|
|
|
|