<p>Created new PhoneNumberValidator + Test.  Validator hides<br>
no arg constructor; public constructor requires two letter<br>
ISO country code for validating inputs.</p>
<p>After successful validation, inputs are transformed into E.164<br>
format and cached in a field, accessible via a getter method.<br>
However, area and region codes are not checked for correctness.<br>
End users are responsible for correctness of area/region codes.</p>
<p>Four i18n properties (validation.phone.*) were added to<br>
displayStrings.properties</p>
<p>This is a partial fix for Issue <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="475609744" data-permission-text="Issue title is private" data-url="https://github.com/bisq-network/bisq/issues/3042" data-hovercard-type="issue" data-hovercard-url="/bisq-network/bisq/issues/3042/hovercard" href="https://github.com/bisq-network/bisq/issues/3042">#3042</a>.  The validator<br>
will be integrated into the GUI if PR is approved & patch is<br>
merged.</p>
<p>Question for Bisq devs:<br>
Another new pkg protected class, CountryCallingCodes, contains<br>
an immutable map of ISO country codes -> country calling codes;<br>
it is the only non-validator class in its package.  The map<br>
declaration is too large to live in the PhoneNumberValidator class,<br>
even after tweaking idea.properties in an attempt to prevent<br>
the IDE from freezing.  Is it OK to leave CountryCallingCodes<br>
where it is, or is there a more appropriate home for it?</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/3134'>https://github.com/bisq-network/bisq/pull/3134</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Validate phone numbers</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3134/files#diff-0">core/src/main/resources/i18n/displayStrings.properties</a>
    (5)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3134/files#diff-1">desktop/src/main/java/bisq/desktop/util/validation/CountryCallingCodes.java</a>
    (278)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3134/files#diff-2">desktop/src/main/java/bisq/desktop/util/validation/PhoneNumberValidator.java</a>
    (143)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3134/files#diff-3">desktop/src/test/java/bisq/desktop/util/validation/PhoneNumberValidatorTest.java</a>
    (291)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/3134.patch'>https://github.com/bisq-network/bisq/pull/3134.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/3134.diff'>https://github.com/bisq-network/bisq/pull/3134.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/3134?email_source=notifications&email_token=AJFFTNTM4DHURTZ4FOMIWIDQGA3CFA5CNFSM4IPCU6SKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHDTUCQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNXOVIAPSI6L6VT6RS3QGA3CFANCNFSM4IPCU6SA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AJFFTNV5SIW5PBABVTY7DD3QGA3CFA5CNFSM4IPCU6SKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHDTUCQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/3134?email_source=notifications\u0026email_token=AJFFTNTM4DHURTZ4FOMIWIDQGA3CFA5CNFSM4IPCU6SKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHDTUCQ",
"url": "https://github.com/bisq-network/bisq/pull/3134?email_source=notifications\u0026email_token=AJFFTNTM4DHURTZ4FOMIWIDQGA3CFA5CNFSM4IPCU6SKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHDTUCQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>