PHP Classes

Validator Class: Validate values reverting to defaults when invalid

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 1,988 All time: 1,979 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: ???
Age: 63
All time rank: 812
Week rank: 360 Up

  Files folder image Files  
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

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,988
This week:0
All time:1,979
This week:673Up