Login   Register  
PHP Classes
elePHPant
Icontem

Validator Class: Validate values reverting to defaults when invalid

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2004-03-10 (10 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 1,956 All time: 1,891 This week: 1,330Up
Version License Categories  
validatorclass 1.0GNU General Public Lice...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: 54
All time rank: 739
Week rank: 1770 Down

  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,956All time:1,891
 This week:0This week:1,330Up