M Makumbi Well-Known Member Licensed User Longtime User Jul 18, 2019 #1 Please help how can i ensure that a person inputs the right phone numbers without entering more or less characters examples 0772333456
Please help how can i ensure that a person inputs the right phone numbers without entering more or less characters examples 0772333456
asales Expert Licensed User Longtime User Jul 19, 2019 #2 Maybe this: https://www.b4x.com/android/forum/threads/phone-number-formating.32371/#post-188734 or using Regex with this: https://stackoverflow.com/questions/123559/a-comprehensive-regex-for-phone-number-validation Upvote 0
Maybe this: https://www.b4x.com/android/forum/threads/phone-number-formating.32371/#post-188734 or using Regex with this: https://stackoverflow.com/questions/123559/a-comprehensive-regex-for-phone-number-validation
JackKirk Well-Known Member Licensed User Longtime User Jul 20, 2019 #3 A while back I contributed this to the B4A additional libraries: https://www.b4x.com/android/forum/threads/b4a-and-b4j-phonevalidator-library.94014/#post-594868 It is a simple wrap of google's libphonenumber library and hence is pretty comprehensive (e.g. is country aware) and works a treat. Upvote 0
A while back I contributed this to the B4A additional libraries: https://www.b4x.com/android/forum/threads/b4a-and-b4j-phonevalidator-library.94014/#post-594868 It is a simple wrap of google's libphonenumber library and hence is pretty comprehensive (e.g. is country aware) and works a treat.
Sandman Expert Licensed User Longtime User Jul 20, 2019 #4 Relevant article: Falsehoods Programmers Believe About Phone Numbers https://github.com/google/libphonenumber/blob/master/FALSEHOODS.md Upvote 0
Relevant article: Falsehoods Programmers Believe About Phone Numbers https://github.com/google/libphonenumber/blob/master/FALSEHOODS.md
JackKirk Well-Known Member Licensed User Longtime User Jul 21, 2019 #5 Sandman said: Falsehoods Programmers Believe About Phone Numbers Click to expand... It is precisely for all these sorts of reasons that the formatting and Regex style solutions are inadequate. Note this link comes from the google libphonenumber effort which is what is used by my phonevalidator library. To stay up to date you need to regularly update the libphonenumber-x.x.x.jar which now stands at 8.10.15 - and update the ...B4A/Additional Libraries/phonevalidator.xml to reflect this I have updated the phonevalidator library thread accordingly. Last edited: Jul 21, 2019 Upvote 0
Sandman said: Falsehoods Programmers Believe About Phone Numbers Click to expand... It is precisely for all these sorts of reasons that the formatting and Regex style solutions are inadequate. Note this link comes from the google libphonenumber effort which is what is used by my phonevalidator library. To stay up to date you need to regularly update the libphonenumber-x.x.x.jar which now stands at 8.10.15 - and update the ...B4A/Additional Libraries/phonevalidator.xml to reflect this I have updated the phonevalidator library thread accordingly.