Restrict the input characters in textfield / numberfield using regular expression?
问题 I use numberField in ExtJS Form and want to enter only positive numbers, in range of 0-99 and it should accept only 2 characters (and not more than 2). { xtype:"textfield", allowNegative: false, allowDecimals: false, minValue: 0, maxValue: 99, maxLength: 2 } gives an error in above code but it is accepting more then 2 characters. I also tried below but issue is same: { xtype:"textfield", regex: /^\d{0,2}$/, regexText: "<b>Error</b></br>Invalid Number entered.", validator: function(v) { return