title: JavaScript: client-side vs. server-side validation
body: <p>Which is better to do client side or server side validation?</p>
  
  <p>In our situation we are using </p>
  
  <ul>
  <li>jQuery and MVC.  </li>
  <li>JSON data to pass between our View and Controller.  </li>
  </ul>
  
  <p>A lot of the validation I do is validating data as users enter it.
  For example I use the the <code>keypress</code> event to prevent letters in a text box, set a max number of characters and that a number is with in a range. </p>
  
  <p>I guess the better question would be, Are there any benefits to doing server side validation over client side?</p>
  
  <hr>
  
  <p>Awesome answers everyone. The website that we have is password protected and for a small user base(&lt;50). If they are not running JavaScript we will send ninjas. But if we were designing a site for everyone one I'd agree to do validation on both sides.</p>