Jul 21, 2009, 10:40 AM
Selective Validation
How can I validate only certain fields in a form panel?
Ext.getCmp('id_control').isValid()
You can make a loop in all them field of the form and to only validate the ones that you wantExt.each(Ext.getCmp('id_formPanel').getForm().items.items, function(x) {
if (!Ext.getCmp(x.id).isValid()) {
}
});
TextField1.isValid();
<ext:FormPanel ID="BasicForm" runat="server" AutoWidth="true" Frame="true" AutoHeight="true" MonitorValid="true" BodyStyle="padding: 10px 10px 0 10px;">
<Defaults>
<ext:Parameter Name="anchor" Value="95%" Mode="Value" />
<ext:Parameter Name="allowBlank" Value="true" Mode="Raw" />
<ext:Parameter Name="msgTarget" Value="side" Mode="Value" />
</Defaults>
<Body>