سؤال

I am Using EXT-JS 3.x

In the number field, it's not accepting when i am trying to input 0. i am using these following validation:

allowDecimals : false,

allowNegative : false,

But i need to be able to enter zero (0) into the number field.

Is by anyway these previous validation are hindering inputting zero?

What validation can i need to add that would also keep my already existing validations intact ?

Could anyone help me throw some light on this issue?

هل كانت مفيدة؟

المحلول

I just put together a fiddle that shows it working with the options you provided: http://jsfiddle.net/c4mj7/

You probably have something else in the way.

var number = new Ext.form.NumberField({
    renderTo:'number',
    allowDecimals : false,
    allowNegative : false
});
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top