powmedia / backbone-forms

Form framework for BackboneJS with nested forms, editable lists and validation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Number cannot accept negative values

thevikas opened this issue · comments

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?

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?