question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE REQUEST] isValidPhone(type) instead of isValidPhone()

See original GitHub issue

Hi.

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:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
silvioprogcommented, Jul 7, 2020

@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.

1reaction
hyanmandiancommented, Jul 7, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found