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

min: 0 validation broken #340

Open
benmathes opened this issue Nov 28, 2016 · 3 comments
Open

min: 0 validation broken #340

benmathes opened this issue Nov 28, 2016 · 3 comments

Comments

@benmathes
Copy link

benmathes commented Nov 28, 2016

When the entered value is .2 instead of 0.2, the value is marked invalid when it is actually valid.

While a javascript number can't be written as .2, <input> values (e.g. $('<input>').val()) are strings.

jsFiddle: http://jsfiddle.net/j6ku2o18/3/

@benmathes
Copy link
Author

(working on a PR, should just be a quick fix to the number regex)

@benmathes
Copy link
Author

benmathes commented Nov 29, 2016

fixed in PR #341

@blikblum
Copy link
Contributor

This is fixed in a fork i'm maintaining (tried contact this repository admins without luck): https://github.com/blikblum/backbone.validation

The updated package can be found at https://www.npmjs.com/package/backbone.validation

To use with node: npm install backbone.validation

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

2 participants