backbone.validation
backbone.validation copied to clipboard
`min: 0` validation broken
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/
(working on a PR, should just be a quick fix to the number regex)
fixed in PR https://github.com/thedersen/backbone.validation/pull/341
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