Projects / Validate_fields Class

Validate_fields Class

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.


Recent releases

  •  20 Feb 2006 13:52

    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.

    •  20 Feb 2006 13:47

      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.

      •  23 Jun 2005 12:29

        Release Notes: A small bug inside the email pattern was fixed. Danish translations were added.

        •  22 Jun 2005 22:18

          Release Notes: The validation of email addresses was not good. The regex pattern has been changed to validate the most common cases.

          •  19 Dec 2004 14:17

            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.


            Project Spotlight


            A Fluent OpenStack client API for Java.


            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.