<p><b>@ghubstan</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/bisq-network/bisq/pull/3134#discussion_r317375052">desktop/src/main/java/bisq/desktop/util/validation/PhoneNumberValidator.java</a>:</p>
<pre style='color:#555'>> + this.callingCode = countryCallingCodes.getCallingCode(isoCountryCode);
+ this.normalizedCallingCode = countryCallingCodes.getNormalizedCallingCode(isoCountryCode);
+ }
+
+
+ @Override
+ public ValidationResult validate(String input) {
+ normalizedPhoneNumber = null;
+ ValidationResult result = super.validate(input);
+ if (!result.isValid) {
+ return result;
+ }
+ final String trimmedInput = input.trim();
+ boolean isCountryDialingCodeExplicit = trimmedInput.startsWith("+");
+ // remove non-digit chars: plus sign, dashes, parens, hashes, slashes and white spaces
+ String pureNumber = input.replaceAll("[\\+\\s+()\\-\\−\\#\\\\]", "");
</pre>
<p>Yeah, "[^A-Za-z0-9]" is a much better regex for this purpose. I'll make that change soon, but maybe not tonight.</p>
<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=AJFFTNXK3YJ5RZZXC7I4GL3QGGSVHA5CNFSM4IPCU6SKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCS7KHA#discussion_r317375052">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNX2MT54TQGNSS26EODQGGSVHANCNFSM4IPCU6SA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AJFFTNUAPFKPLSJWRPSE3BDQGGSVHA5CNFSM4IPCU6SKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCS7KHA.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=AJFFTNXK3YJ5RZZXC7I4GL3QGGSVHA5CNFSM4IPCU6SKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCS7KHA#discussion_r317375052",
"url": "https://github.com/bisq-network/bisq/pull/3134?email_source=notifications\u0026email_token=AJFFTNXK3YJ5RZZXC7I4GL3QGGSVHA5CNFSM4IPCU6SKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCCS7KHA#discussion_r317375052",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>