开发者

why doesn't Ext.form.field.disable automatically revalidate

    var bFoo = foo === "true";
    cmp.setDisabled(!bFoo ); //disabled always passes validation
    cmp.validate();

why doesn't Ext 3.3 call validate, or clearInvalid, for us in Ext.form.field.disable() ?

when the field is disabled, the invalid-style incorrectly lingers until the field is next validated. I think it should always validate immediately, or clear the style开发者_C百科.

this also happens with enable() on a field with allowBlank=false; the disabled-style goes away, but the invalid-style doesn't appear until the user clicks, which is wrong.


Because disabled fields aren't submitted, so it doesn't matter if they're valid. Also, because disabled fields are disabled, the (non-programmer) user can't change the invalid value(s).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜