backbone.validation icon indicating copy to clipboard operation
backbone.validation copied to clipboard

`min: 0` validation broken

Open benmathes opened this issue 8 years ago • 3 comments

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 avatar Nov 28 '16 23:11 benmathes

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

benmathes avatar Nov 29 '16 19:11 benmathes

fixed in PR https://github.com/thedersen/backbone.validation/pull/341

benmathes avatar Nov 29 '16 21:11 benmathes

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

blikblum avatar Apr 22 '18 16:04 blikblum