I have a form in which some of the fields need to be validated at the server side.
When the form is submitted, then the server validates the values of these fields and if validations fail then server returns success:false (along with name and error message of each field at which validation has failed).
Now, I need to display such fields as 'invalid' and apply the same red-border around them which is default done by ExtJS if client side validation failed.
I tried using the following:
Ext.getCmp('fieldId').markInvalid() and invalidCls:'x-form-invalid-field'
I used the above statements in the 'failure' callback function of form.submit. These statments get called but don't apply any effect on such fields.
Thus could anyone guide at the following:
How to mark a field invaild and apply the same effect (having red-borders) around it when a custom validation fails?
Thanks in advance.