title: Is this a good design for doing form validation?
body: <p>For my framework I've written down this concept to solve the form validation problem. I want it to be as straightforward as possible for the framework user.</p>
  
  <p>Every Form (=object) has one or many FormElements (=objects). Every FormElement can have 0-n FormValidators (=objects). Everything easily configured through the backend (simple drag&amp;drop stuff).</p>
  
  <p>When the Form View is rendered, it loops over all the FormElements, and for each of them it loops over all their associated FormValidators. That way it builds up all the needed JavaScript to validate the form on client side.</p>
  
  <p>A FormValidator is an lightweight object which defines only these seven things:</p>
  
  <ul>
  <li>PHP class name of the validation utility class</li>
  <li>method name of the validation utility class, which must be called</li>
  <li><p>a string for additional arguments (comma-separated values)</p></li>
  <li><p>JavaScript "class" name of the validation utility</p></li>
  <li>"method" name which must be called</li>
  <li><p>a tring for additional arguments (comma-separated values)</p></li>
  <li><p>an associated ErrorInfo object which contains an formatted error message</p></li>
  </ul>
  
  <p>Every of these validation methods takes as first argument an input variable with the input data. Every of these methods just check the input if it matches some rule(s), and returns TRUE or FALSE.</p>
  
  <p>When the form is submitted, an FormDataManager is created and receives:
   - the Form object (so it knows from where the data came from)
   - the input data (typically $_POST)</p>
  
  <p>It then just iterates over all the FormElements, checks all their FormValidators, and if anything is invalid, it reloads the Form which is passed the error messages array. If everything is fine, the data is further processed (i.e. stored to db).</p>
  
  <p>Are there improvements in this design? Anything I've missed?</p>