This class can validate forms with rules defined in form template.
It takes as parameter HTML template that defines the layout of a form with inputs.
The class can validate the submitted form values using rules defined in HTML attributes of the input tags in the the form HTML template.
It supports rules defined in HTML 5 specification as well other custom types of validation rules like required, week, month, color, creditcard, url, integer, number, range, email, alphabetic, alphanumeric, time, datetime, datetime-local, date, captcha, zipcode, countryelement, maxlength, minlength, min, max, mustmatch, enum and callback.
The class can also parse the template to remove the validation attributes that are not valid in HTML 4 or HTML 5, and then it replaces the input values attributes with the form submitted values.