angular-input-masks
Version:
Personalized input masks for AngularJS
13 lines (11 loc) • 322 B
JavaScript
module.exports = {
maxNumber: function(ctrl, value, limit) {
var max = parseFloat(limit, 10);
return ctrl.$isEmpty(value) || isNaN(max) || value <= max;
},
minNumber: function(ctrl, value, limit) {
var min = parseFloat(limit, 10);
return ctrl.$isEmpty(value) || isNaN(min) || value >= min;
}
};
;