title: A PHP and jQuery form creation and validation library available?
body: <h2>Original Question</h2>
  
  <p>Is there a well tested and preferably mature library out there for creating forms in PHP with both client side (this is where the jQuery comes in) and server side validation?</p>
  
  <p>Ideally the form would either be generated from PHP classes or written as plain HTML and parsed ala <a href="http://www.agavi.org" rel="nofollow noreferrer">Agavi</a>. The correct jQuery hooks would then automatically be created by the library so that the included jQuery client side validation can run.</p>
  
  <p>One of the jobs I do regularly is some variation on the good old contact form and I would like to standardise this work so that I can trot out the same best practice code each time. With this in mind the HTML generated by the PHP classes should be good enough so that extra CSS hooks can be added where needed etc.</p>
  
  <p>Any suggestions gratefully received.</p>
  
  <hr>
  
  <h2>Update</h2>
  
  <p>I have been combing through and reviewing the options that I have found and that others have suggested below and at the moment I would rank the projects in the following order for quality from the small amount of testing and research I have done on all of them.</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/5362842/a-php-and-jquery-form-creation-and-validation-library-available/5389651#5389651">ValidForm Builder</a></li>
  <li><a href="https://stackoverflow.com/questions/5362842/a-php-and-jquery-form-creation-and-validation-library-available/5363589#5363589">jFormer</a></li>
  <li><a href="https://stackoverflow.com/questions/5362842/a-php-and-jquery-form-creation-and-validation-library-available/5367480#5367480">HTML_QuickForm2</a> (if you can get the client side validation working then this should jump higher than jFormer!)</li>
  <li><a href="https://stackoverflow.com/questions/5362842/a-php-and-jquery-form-creation-and-validation-library-available/5362972#5362972">php-form-builder-class</a></li>
  <li><a href="https://stackoverflow.com/questions/5362842/a-php-and-jquery-form-creation-and-validation-library-available/5428229#5428229">Use Symfony!</a> (a whole MVC framework for form rendering and validation is overkill)</li>
  </ol>
  
  <p>I am still unconvinced by any of the options to be honest and I am left wondering why people who embark on these projects do not start with some solid and well tested components. For example I would have thought a combination of:</p>
  
  <ul>
  <li><a href="http://parsleyjs.org" rel="nofollow noreferrer">Parsley.js</a> Client side validation</li>
  <li><a href="http://symfony.com/doc/2.0/book/forms/overview.html" rel="nofollow noreferrer">Symfony form</a> component perhaps</li>
  <li>Perhaps with <a href="https://github.com/Respect/Validation" rel="nofollow noreferrer">Respect Validation</a></li>
  </ul>
  
  <p>Would give you a good stable base to work from and produce a nice library on top of tested components.</p>
  
  <p>Also if you are interested in a library that parses your HTML rather than generating the HTML from a PHP class I have found a project called <a href="https://github.com/mellowplace/Minacl" rel="nofollow noreferrer">Minacl</a>. Like the <a href="http://www.agavi.org" rel="nofollow noreferrer">Agavi</a> option I mentioned in the original question.</p>