title: Set the focus on the first input element with error message and set the tab of the TabStrip containing it to active
body: <p>I have a form with some input fields. I am using the tabStrip KendoUI widget to group the input fields. I am using the Kendo validator and when the form is submitted some error messages are triggered. The problem is that if the input field with the error message is on a different tab then the currently selected the user cannot see it. What I want to accomplish is when the form is validated the tab containing the first input field with error message to be selected and the focus to be on that input field. Here is some sample code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $("#tabStrip").kendoTabStrip();
  &lt;/script&gt;
  
  &lt;div id="tabStrip"&gt;
      &lt;ul&gt;
          &lt;li class="k-state-active"&gt;Master Info&lt;/li&gt;
          &lt;li&gt;Developer Info&lt;/li&gt;
      &lt;/ul&gt;
       &lt;div id="tabStrip-1"&gt;
           &lt;div&gt;
              &lt;label for="folderName" class="required"&gt;Folder Name:&lt;/label&gt;
              &lt;input type="text" id="folderName" name="folderName"  required /&gt;
              &lt;span class="k-invalid-msg" data-for="folderName"&gt;&lt;/span&gt;
          &lt;/div&gt;
          &lt;div&gt;
              &lt;label for="afk"&gt;Afk:&lt;/label&gt;
              &lt;input type="text" id="afk" name="afk" data-bind = "value: Afk" /&gt;
          &lt;/div&gt;
       &lt;/div&gt;
       &lt;div id="tabStrip-2"&gt;
           &lt;div&gt;
              &lt;label for="updateFolder" class="required"&gt;Update Folder:&lt;/label&gt;
              &lt;input type="text" id="Text1" name="updateFolder" class="k-input k-invalid" required /&gt;
              &lt;span class="k-invalid-msg" data-for="updateFolder"&gt;&lt;/span&gt;
          &lt;/div&gt;
          &lt;div&gt;
              &lt;label for="age"&gt;Age:&lt;/label&gt;
              &lt;input type="text" id="age" name="age" class="k-input k-invalid" data-bind = "value: Age" /&gt;
          &lt;/div&gt;
       &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My idea is to take all the input fields that are in div with id="tabStrip-1" and check if they contain <code>class="k-input k-invalid"</code> which as far as I understand is applied to the input field when there is a validation error. If the input field contains the class I will change the id of the tab to be this one and set the focus on that element. If all fields are valid I will do the same with the next tab, I tried this with Jquery to take the input elements and foreach them but my skills in web development are very poor and I did not succeed. I think my approach will work though. Any help with working example or suggestions for better approach will be greatly appreciated. Thank You!</p>