[bisq-network/bisq] Validate phone numbers (#3149)

Stan notifications at github.com
Thu Aug 29 15:19:06 UTC 2019


Hi, I have some questions about integrating the PhoneNumberValidator into the GUI.

I'm starting with the Swish (Sweden) payment method.  If I use the new PhoneNumberValidator in place of the SwishValidator (which just does validateIfNotEmpty(phone)), SwishValidator becomes dead code.   

The same is true for HalCash's (Spain & Poland) HalCashValidator, and possibly a few other payment methods' validators as well.

Q1:  Should I tag Validators that will 'die' in this PR as @Deprecated?

Q2:  Should I remove unused Validators from the project, and tweak constructor signatures, etc., that include them?

Another issue about the HalCash payment method (& others, I think), is the need for an iso country code to validate and normalize the phone numbers.  For Swish, "SE", the country is known.  For HalCash, it's ES or PL, and the user will need to input the country in the payment method form.  The same will be true for relatively more country agnostic payment methods.  

Q3:  In the country agnostic payment methods, should I include a country selector in the payment method forms that `((require phone number) && (require country code for phone validation))`?

Q4:  Should those new country selectors include only countries that are valid for a particular payment method?

Questions 3 and 4 are based on the assumption the user's default locale != payment-method's country.  For example, I'm in Brazil, but my payment method is US specific.  I'm sure this is the case for many users in Europe too.  The payment method's country will need to be specified for phone validation & normalization.

Just trying to measure twice and cut "not much more than once" in this patch.  I can't do that without advice from Bisq's veterans.

Thanks.

-- 
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/3149#issuecomment-526233744
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190829/9510b6ef/attachment.html>


More information about the bisq-github mailing list