Private Validator is a class that can be used to validate the HTML output of a private Web server via the public W3C's Validation Service.
This class is useful to validate pages served by a private Web server that cannot be reached by W3C's server. The class fetches a private page to be validated and submits it to the validator service pages and collect the validation results.
This class is meant to validate data entered in forms.
It provides 11 types of validation. To specify a field to validate it requires the field name and, in some cases, other arguments.
The class will return false if the validation failed.
Validator has support to check if a field is or has:
- filled in
- of specified length (<, >, >=, <=, =)
- a valid email
- a string equal in string value to another field
- a string between two values (string length)
- punctuation
- an integer of specified value (<, >, >=, <=, =)
- an integer between two values
- only alphabetic characters
- only alphanumeric characters
- a date of specified format
This class can validate XHTML documents. It may also validate other types of XML documents.
It can validate a XHTML document first determining whether it is well-formed and then verifying whether it uses only valid tags and attributes. The list of tags and attributes accepted as valid is configurable.
If there is an error, it can provide detailed information about what ist wrong.
It uses PHP 5 syntax and exceptions for handling errors.
This class is meant to provide server side validation of field values submitted via Web forms.
It can validate fields on following criteria:
- Required field
- Content ( email, digit, alpha, alpha-numeric )
- Own perl or posix regular expression
- Length ( min, max, equal )
- Only defined values ( for select, radio and checkbox )
- Forbidden values
- Field values dependecies
* Value can only exist with other field(s)
* Value must be equal to other field(s) ( ex. password verification )
* Value must exists OR/XOR other value(s)
- It handles fields named like an array ( ex. radiobox/checkbox )
- It can highlight the invalid fields ( with Smarty templates )
- It can return an array which information which fields were invalid ( with field name, or logical name )
This class is meant to add security to your forms generating images to perform CAPTCHA validation (Completely Automated Public Turing to tell Computers from Humans Apart).
It generates images with random words or uses the words that you may provide.
The images are generated with random colors and fonts, avoiding replication on other sites. You can add other colors and fonts.
The word used in the generated image is stored on the PHP session variables for security verification.