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

Number cannot accept negative values #548

Open
thevikas opened this issue Feb 7, 2018 · 1 comment
Open

Number cannot accept negative values #548

thevikas opened this issue Feb 7, 2018 · 1 comment

Comments

@thevikas
Copy link

thevikas commented Feb 7, 2018

var numeric = /^[0-9]*\.?[0-9]*?$/.test(newVal);

A Number can also be a negative which starts with a dash. The regex fails to accept this sort of numbers. The same field shows a slider on the right. One can that slider to get to negative numbers and that is fine and passes validation since no keypress was done.

Any suggestion on how to get around it?

@thevikas
Copy link
Author

thevikas commented Feb 7, 2018

Found a fix (2013) has already been merged to master (2016): 91bbe41

So i guess we are waiting for it to be released. Can we get it quicker?

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

1 participant