Hi, On Wed, Jan 4, 2012 at 12:49 AM, Carlos Lobato <[email protected]> wrote: > Hi apache click folks, > > I have been trying to make my app take a NumberField only if 5 digits are > input. With controls like TelephoneField all I have to do is set its minimum > length to whatever I want it to and the app will display an error if > minLength or maxLength aren't met. However, NumberField seems to ignore > minimum length, even though the documentation states that there are error > messages mapped for NumberFields for min or max length errors.
NumberField support min and max value, but not min and max length. So you can do: field.setMaxValue(99); > would also like to know what is the proper way to override its validation > and do my own thing, because that seems to be another way to accomplish > custom validations, right now this field is only validated when it gets no > input (setRequired). You can override the validate() method to do your own validation. regards Bob
