Numeral-js: numeral.validate doesn't work on negative numbers

Created on 8 Oct 2014  路  10Comments  路  Source: adamwdraper/Numeral-js

numeral.validate("-1234") returns false

bug

All 10 comments

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

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

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

stumbled upon this bug today

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

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

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

Sorry, but: WTF :)

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

@super-kamil https://github.com/zeusdeux/Numeral-js/commit/c620b580d533063354fc31fc05d867e56609c100

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

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

  1. Took me a while to figure out, but that's still an issue..
Was this page helpful?
0 / 5 - 0 ratings

Related issues

garbinmarcelo picture garbinmarcelo  路  5Comments

tab00 picture tab00  路  8Comments

MisterGoodcat picture MisterGoodcat  路  3Comments

zzzgit picture zzzgit  路  5Comments

anselms picture anselms  路  4Comments