title: Restrict the input characters in textfield / numberfield using regular expression?
body: <p>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).</p>
  
  <pre><code>{
      xtype:"textfield",
      allowNegative: false,
      allowDecimals: false,
      minValue: 0,
      maxValue: 99,
      maxLength: 2
  }
  </code></pre>
  
  <p>gives an error in above code but it is accepting more then 2 characters.</p>
  
  <p>I also tried below but issue is same:</p>
  
  <pre><code>{
      xtype:"textfield",
      regex: /^\d{0,2}$/,
      regexText: "&lt;b&gt;Error&lt;/b&gt;&lt;/br&gt;Invalid Number entered.",
      validator: function(v) {
          return /^\d{0,2}$/.test(v)?true:"Invalid Number";
      }
  }
  </code></pre>
  
  <p>How to restrict to input more then 2 characters?</p>