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

numeral.validate doesn't work on negative numbers #213

Open
fdelbos opened this issue Oct 8, 2014 · 11 comments
Open

numeral.validate doesn't work on negative numbers #213

fdelbos opened this issue Oct 8, 2014 · 11 comments
Labels

Comments

@fdelbos
Copy link

fdelbos commented Oct 8, 2014

numeral.validate("-1234") returns false

@jwlrs
Copy link

jwlrs commented Nov 3, 2014

What am I missing on this one -- numeral has no validate function as far as I can see?

@zeusdeux
Copy link
Contributor

zeusdeux commented Nov 9, 2014

@joelarson4 it does in develop branch
@fdelbos I have opened a pull request that fixes this bug

zeusdeux added a commit to zeusdeux/Numeral-js that referenced this issue Nov 9, 2014
@djensen47
Copy link

Normally I don't like to "bump" issue because it's just noise but it's been over 2 years on this one. Thanks.

@Ludevik
Copy link

Ludevik commented May 11, 2017

stumbled upon this bug today

numeral.validate('-50','en') = false

@chartzoge
Copy link

Bump as well. It would be really nice to have a validate function that worked with negatives.

@Goran-n
Copy link

Goran-n commented Nov 30, 2017

Bump as well. This library is not complete without this feature.

@super-kamil
Copy link

Sorry, but: WTF :)

numeral.validate(-10) = false ???

@zeusdeux
Copy link
Contributor

@super-kamil zeusdeux@c620b58

There’s a many year old PR with this change but I doubt it’s been merged.

@super-kamil
Copy link

Is there any chance of merging this? I'm using Numeral.js in a large application as part of i18next stack (https://www.i18next.com/formatting.html). I have to add a custom validation now before passing it to Numeral.js

@winkelsdorf
Copy link

  1. Took me a while to figure out, but that's still an issue..

@ashley00101010
Copy link

It's 2022, any updates on this issue?

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

No branches or pull requests