[FEATURE REQUEST] isValidPhone(type) instead of isValidPhone()
See original GitHub issueHi.
It would be nice to allow to validade a phone number by its type, for example:
const test = isValidPhone(); // Validates both phone and mobile phone number
const test = isValidPhone(false); // Validates only phone number
const test = isValidPhone(true); // Validates only mobile phone number
or maybe providing separated functions, like isValidPhone()
and isValidMobilePhone()
.
cheers
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Phone number validation Android - Stack Overflow
Use isGlobalPhoneNumber() method of PhoneNumberUtils to detect whether a number is valid phone number or not. Example. System.out.println("....g1.
Read more >Flutter form validation: The complete guide - LogRocket Blog
Form validation is an invaluable skill for Flutter developers. Use this comprehensive guide to explore the most common methods.
Read more >Validating phone numbers in Amazon Pinpoint
Amazon Pinpoint includes a phone number validation service that you can use to determine if a phone number is valid, and to obtain...
Read more >Generic way to validate textField inputs in Swift - Tutorialspoint
It becomes tedious to write same line of code for every input field ... validatePhone.evaluate(with: trimmedString) return isValidPhone ...
Read more >TextField either phone number or Email format validation swift?
I've updated the code you've provided a little bit by changing the validation checks. I think validInput.isValidPhone() || validInput.isValidEmail() is not ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@hyanmandian Great! So, i’m going to fork this repo and try to implement it to send as PR …
Edit: PR sent at https://github.com/brazilian-utils/brazilian-utils/pull/98.
Thanks! I don’t have time right now to implement these utilities (maybe next week), but you can contribute with our project if you feel comfortable with that.