The Validate_fields Class is an easy-to-use form field validation PHP script. This class can be used to validate database inputs or mail forms. It can validate simple text, numbers, dates, urls, email addresses, and the presence of HTML tags. Invalid form fields will be reported inside a detailed error message.
|Tags||Internet Web Dynamic Content Software Development Libraries php classes|
Release Notes: A small improvement in the create_msg() method makes it possible to switch between the XHTML version and the simple HTML version. In the fields array one key was named "name", and it has been renamed to "value" to make it more clear. The variable declarations at the beginning of the validation method was removed. Because the value of a checkbox (radio) type field is only available if the element is checked, there are new functions to validate this elements.
Release Notes: The regular expression pattern of the check for HTML code wasn't good, but is working now. The example page was modified to test general text inside a textarea (which is useful to test the HTML code check). There are also Spanish translations for the messages now.
Release Notes: A small bug inside the email pattern was fixed. Danish translations were added.
Release Notes: The validation of email addresses was not good. The regex pattern has been changed to validate the most common cases.
Release Notes: Negative integers will now be validated. A new validation method was added, called check_html_tags(). If the $check_4html variable is set to true, all fields will be validated for HTML tags. The method for the URL check was optimized and otherwise modified. It is now possible to validate (nearly) all kind of URLs from the HTTP protocol.