| 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 aa556a7ed4533598a0287a312c56866bbab1c57e..7c953a1de06c05918ede198a8b3b3e59e12bd487 100644
|
| --- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
|
| @@ -433,11 +433,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;
|
| }
|
|
|
|
|