title: ExtJS 4 - How to mark form field invalid and display red borders around it (as done default by ExtJS) if custom validation fails?
body: <p><img src="https://i.stack.imgur.com/QutTU.jpg" alt="enter image description here"></p>
  
  <p>I have a form in which some of the fields need to be validated at the server side.</p>
  
  <p>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).</p>
  
  <p>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.</p>
  
  <p>I tried using the following:</p>
  
  <p>Ext.getCmp('fieldId').markInvalid() and invalidCls:'x-form-invalid-field'</p>
  
  <p>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.</p>
  
  <p>Thus could anyone guide at the following:</p>
  
  <p><strong>How to mark a field invaild and apply the same effect (having red-borders) around it when a custom validation fails?</strong></p>
  
  <p>Thanks in advance.</p>