New issue
Advanced search Search tips

Issue 703754 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Add Phone number validation to payments address editor.

Project Member Reported by mad@chromium.org, Mar 21 2017

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...

 

Comment 1 by mad@chromium.org, Mar 21 2017

Components: UI>Browser>Autofill>Payments
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Owner: ma...@chromium.org
Status: Assigned (was: Untriaged)
Mathieu: is this fixed?

Comment 4 by ma...@chromium.org, Jun 19 2017

Owner: se...@chromium.org
To some degree. Seb, can you either close or make the bug more specific?

Comment 5 by se...@chromium.org, Jun 19 2017

Status: Fixed (was: Assigned)
Yep this is done. Closing
Components: -UI>Browser>Autofill>Payments UI>Browser>Payments

Sign in to add a comment