PHP Classes

Validator Class: Validate values reverting to defaults when invalid

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 1,988 All time: 1,981 This week: 673Up
Version License Categories
validatorclass 1.0.0GNU General Publi...Text processing, Validation
Description 

Author

This class is meant to validate page request values eventually submitted using forms via POST or GET HTTP methods.

The class provides functions that retrieve values submitted in a request variable of a given name and then performs the specified type of validation.

The class provides many built-in types of validation like: is it a valid number, integer, boolean, name of variable, it contains only letters, is it a valid e-mail adress, is it an integer within a given range, or even determine if it is a valid URL by trying to access it.

The class also lets the developers choose its behavior when the value being validated is invalid. The validation functions may return either an empty string, null, zero, or any other default value.

Picture of Stefan Ihringer
Name: Stefan Ihringer <contact>
Classes: 2 packages by
Country: ???

  Files folder image Files (2)  
File Role Description
Plain text file validator.class.php Class main class file + documentation
Accessible without login Plain text file validatortest.php Example example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,988
This week:0
All time:1,981
This week:673Up