validator.js
validator.js copied to clipboard
Feature Request: Currency: Option to Require Thousands Separator
We're using this to help validate data that includes currency. We want to make sure that a comma separator is always present.
There's an pull request open to resolve that issue: #945
Thanks @Maxim-Mazurok, will review and get back 👍
@profnandaa - hello. any update on when this feature will get merged in? thanks.
IDK why this PR wasn't merged: https://github.com/validatorjs/validator.js/pull/1084 It looks like a totally valid approach to me. There's no such thing as too many options, especially when people asked for this option... IMO
#1084 was closed without getting merged and it seems that this feature just got lost in the mix. Any chance of revisiting?
Hey, i am looking for my first contribution in open source. Can anyone guide me with this issue i would i like to work on it
Hey, i am looking for my first contribution in open source. Can anyone guide me with this issue i would i like to work on it
#1084 solved this issue already, but the choice was made by the maintainers to reject that approach in search for a larger refactor of isCurrency which would limit the amount of options that is possible. One option that would involve this thousands separator is to merge the allow_ and require_ options so it's not a Boolean but allows a few options. My idea would be something like; required, allowed/optional, forbidden. But feel free to suggest a different wording. This way we can reduce the total amount of options slightly and add this requested functionality. For implementation you can check out the above-mentioned PR