Index: chrome/browser/autofill/autofill_dialog_controller_mac.mm |
diff --git a/chrome/browser/autofill/autofill_dialog_controller_mac.mm b/chrome/browser/autofill/autofill_dialog_controller_mac.mm |
index 7d37d85d55e753fcaac5ca8f1248d071b71fca3b..d39c4568b45ff2cd99b764fef152b7dbeb5ae51a 100644 |
--- a/chrome/browser/autofill/autofill_dialog_controller_mac.mm |
+++ b/chrome/browser/autofill/autofill_dialog_controller_mac.mm |
@@ -764,6 +764,12 @@ void PersonalDataManagerObserver::OnPersonalDataLoaded() { |
- (id)transformedValue:(id)string { |
NSImage* image = nil; |
ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
+ |
+ // We display no validation icon when input has not yet been entered. |
+ if (string == nil || [string length] == 0) |
+ return nil; |
+ |
+ // If we have input then display alert icon if we have an invalid number. |
if (string != nil && [string length] != 0) { |
// TODO(dhollowa): Using SetInfo() call to validate phone number. Should |
// have explicit validation method. More robust validation is needed as |
@@ -778,6 +784,7 @@ void PersonalDataManagerObserver::OnPersonalDataLoaded() { |
} |
} |
+ // No alert icon, so must be valid input. |
if (!image) { |
image = rb.GetNSImageNamed(IDR_INPUT_GOOD); |
DCHECK(image); |