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).
精彩评论