Add Phone number validation to payments address editor. |
|||||
Issue description
Something like this in ShippingAddressValidationDelegate::ValidateValue()
if (field_.type == autofill::PHONE_HOME_NUMBER) {
PhoneNumberUtil* phone_util = PhoneNumberUtil::GetInstance();
PhoneNumber number_object;
return phone_util->Parse(
base::UTF16ToUTF8(value),
parent_->country_codes_[parent_->chosen_country_index_],
&number_object) == PhoneNumberUtil::NO_PARSING_ERROR;
}
After parsing, there is also "IsValidNumber" [1]
https://cs.chromium.org/chromium/src/chrome/browser/autofill/android/phone_nu...
,
Mar 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8e102df2b584bdd38c62ee31f35c0a4eccff5691 commit 8e102df2b584bdd38c62ee31f35c0a4eccff5691 Author: mathp <mathp@chromium.org> Date: Mon Mar 27 17:34:44 2017 [Payments] In shipping address editor, enable required + phone validation. Should be tested as part of upcoming browser_tests. New function in validation.h is not unit-tested because it would be a replica of phone_number_i18n_unittest.cc BUG= 703754 TEST=None, yet. Review-Url: https://codereview.chromium.org/2773383002 Cr-Commit-Position: refs/heads/master@{#459816} [modify] https://crrev.com/8e102df2b584bdd38c62ee31f35c0a4eccff5691/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc [modify] https://crrev.com/8e102df2b584bdd38c62ee31f35c0a4eccff5691/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h [modify] https://crrev.com/8e102df2b584bdd38c62ee31f35c0a4eccff5691/components/autofill/core/browser/validation.cc [modify] https://crrev.com/8e102df2b584bdd38c62ee31f35c0a4eccff5691/components/autofill/core/browser/validation.h
,
Jun 19 2017
Mathieu: is this fixed?
,
Jun 19 2017
To some degree. Seb, can you either close or make the bug more specific?
,
Jun 19 2017
Yep this is done. Closing
,
Jun 27 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by mad@chromium.org
, Mar 21 2017