sproutcore/sproutcore — Issue #616: SC.Validator.Number with decimal places > 0 blocks typing
Author: JasperTouwen
Created: 2011-10-14 20:58:26+00:00
State: open

When using the number validator with decimal places, no keystrokes are accepted. Fixed with: index to the last else statement.

```javascript
validateKeyDown: function(form, field, charStr) {
.......
else return text.match(/^[\-{0,1}]?[0-9,\0]*\.?[0-9\0]+/)===text;
}
}

to

validateKeyDown: function(form, field, charStr) {
.......
else return text.match(/^[\-{0,1}]?[0-9,\0]*\.?[0-9\0]+/)[0]===text;
}
}
```