title: How to apply Client-side validation by calling a server-side function in ASP.NET
body: <p>I have an ASP.NET Web Forms application.</p>
  
  <p>I have a <code>Form</code> with various <code>TextBox</code>and right now I have several <code>asp:RequiredFieldValidator</code> linked to them belonging to the same <code>ValidationGroup</code>.</p>
  
  <p>Now I have to apply to some <code>TextBox</code> an additional validation with related error message. 
  In the specific I got to check whether the text inside the <code>TextBox</code> is a <code>Guid</code> or not. Morevoer this check has to be done on the fly, meaning that as soon as the user moves the cursor from the <code>TextBox</code> the validation has to be performed, without the need to press submit.</p>
  
  <ol>
  <li><p>How can I call the <code>IsGuid(string guid)</code> function from Javascript?</p></li>
  <li><p>How can I attach two different error messages as validation (for instance I want to be displayed a message if <code>TextBox.Text</code> has carachters not allowed and lenght &lt; N)</p></li>
  <li><p>Is it easier to implement this validation with <strong>jQuery</strong> or with the <strong>ASP.NET validators</strong>?</p></li>
  </ol>
  
  <p>If somebody else has any other idea for its implementation, please feel free to propose. Thanks!</p>