title: How to force a form error in jqgrid?
body: <p>Required fields and other restrictions will cause an error to appear in the add/edit form for jqgrid.</p>
  
  <p>Here is the element html:</p>
  
  <pre><code>&lt;tr id="FormError" style=""&gt;&lt;td class="ui-state-error" colspan="2"&gt;State: Field is required&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p>I would like to force an error based on other requirements that I do not see a way of stating in the grid configuration.</p>
  
  <p>Specifically there are relational files that require certain values in the parent file to exist before they can be created.  So when a user is adding a record and attempts to create relation data before specifying the key values I want to stop them and issue an error.</p>
  
  <p>Attached is an example of how it works normally.</p>
  
  <p>Thank you and best regards.</p>
  
  <p><a href="http://i.stack.imgur.com/tgbB7.png" rel="nofollow">jqgrid form error example</a></p>