[bisq-network/bisq] Validate phone numbers (#3134)
battleofwizards
notifications at github.com
Sat Aug 24 20:26:51 UTC 2019
battleofwizards commented on this pull request.
> + public PhoneNumberValidator(String isoCountryCode) {
+ this.isoCountryCode = isoCountryCode;
+ this.countryCallingCodes = new CountryCallingCodes();
+ 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();
It does make perfect sense in Scala b/c vals are actually immutable. In Java final objects are mutable. It is only the reference that cannot be reassigned. Also `final` is longer than `val` so more visual clutter. Anyway, congrats for working with Scala!
--
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/3134#discussion_r317373421
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190824/2ef9b10e/attachment-0001.html>
More information about the bisq-github
mailing list