title: Can I mark a field invalid from javascript?
body: <p>From reading <a href="http://html5doctor.com/css3-pseudo-classes-and-html5-forms/" rel="noreferrer">this post</a> I have found that there are some pseudo classes for 'valid' and 'invalid' input values introduced to HTML5.</p>
  
  <p>Is there a way I can mark an input field as invalid/valid from javascript? Or alternatively, can I override the validation method used?</p>