[bisq-network/bisq] Normalize phone numbers (#3102)

Stan notifications at github.com
Fri Aug 16 21:07:37 UTC 2019


Reluctantly added new dependency: 343 kb Google libphonenumber.
See https://github.com/google/libphonenumber

Created new PhoneNumberValidator + Test.  Validator hides
no arg constructor; public constructor requires two letter
ISO country code for validating national numbers.

If input passes validation, it is transformed into E.164 format
and cached in a class field, accessible via getter method.
See https://en.wikipedia.org/wiki/E.164

Five new i18n error message properties (validation.phone.*) were
added to the default and Portuguese display string property files.
A native Portuguese speaker should review/change the PT strings.

This is partial fix for Issue #3042 -- validator will be integrated
into the GUI after PR(s) approved / merged.
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/3102

-- Commit Summary --

  * Normalize phone numbers

-- File Changes --

    M build.gradle (2)
    M core/src/main/resources/i18n/displayStrings.properties (5)
    M core/src/main/resources/i18n/displayStrings_pt.properties (5)
    A desktop/src/main/java/bisq/desktop/util/validation/PhoneNumberValidator.java (159)
    A desktop/src/test/java/bisq/desktop/util/validation/PhoneNumberValidatorTest.java (404)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/3102.patch
https://github.com/bisq-network/bisq/pull/3102.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/3102
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190816/82918fe1/attachment.html>


More information about the bisq-github mailing list