Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with empty string #9

Closed
kaungmyathan22 opened this issue Nov 10, 2020 · 4 comments
Closed

Not working with empty string #9

kaungmyathan22 opened this issue Nov 10, 2020 · 4 comments

Comments

@kaungmyathan22
Copy link

let phone=""
when calling isValidMMPhoneNumber(phone) return nothing.
and
let phone=" ";
when calling isValidMMPhoneNumber(phone) return false.

@kaungmyatlwin
Copy link
Owner

kaungmyatlwin commented Nov 10, 2020

This is intended behavior. Do you have a better suggestion?

@kaungmyatlwin
Copy link
Owner

Ok coming back to the issue, I see the point you were making. I apologize.

Will release the new version with empty string check to return Boolean.

@kaungmyatlwin
Copy link
Owner

@kaungmyathan22 For phone = ' ', we now will throw an error Phone number is empty.. I don't think it would make sense to return false for such an empty string.

@kaungmyatlwin
Copy link
Owner

Fix provided in 1975dd6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants