I am using an ExtJs form having a file upload field in it. On selecting a file I am calling the submit() method of the form. But before submitting I am checking if the form is
You can try adding the following function to your Form Panel definition:
getInvalidFields: function() {
var invalidFields = [];
Ext.suspendLayouts();
this.form.getFields().filterBy(function(field) {
if (field.validate()) return;
invalidFields.push(field);
});
Ext.resumeLayouts(true);
return invalidFields;
}
It will return an array containing only those fields that were evaluated as invalid, here is a working example.
Here's a much simpler solution:
form.query("field{isValid()==false}")