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

Add an IsValidNumber function #54

Open
bmode opened this issue Nov 23, 2012 · 3 comments
Open

Add an IsValidNumber function #54

bmode opened this issue Nov 23, 2012 · 3 comments

Comments

@bmode
Copy link

bmode commented Nov 23, 2012

Hi, I love this library and it's been really helpful to me on a recent project. One suggestion: could you add a routine to determine if a string will be parsed correctly by "unformat". Something like "isValidNumber( string )". Alternatively, unformat could return null or undefined for invalid input instead of 0. I need to light up invalid text boxes in my application, so I need to be able to tell the difference between invalid and 0.

Thanks again for the really excellent library!

@wizonesolutions
Copy link

👍

1 similar comment
@bijanvakili
Copy link

+1

@Lakshmi-Sharma
Copy link

This is the same as issue #98 and #51
Pull request #122 should fix this. Is takes in an 'invalid value' parameter.

accounting.unformat('what', ',' , null) = null

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

4 participants