PHP Classes

Validator.php: Form Validation class

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
StarStarStar 58%Total: 6,945 All time: 284 This week: 59Up
Version License Categories
validator 1.0.0GNU Lesser Genera...Text processing, Validation
Description 

Author

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

Picture of Kevin Burke
Name: Kevin Burke <contact>
Classes: 2 packages by
Country: United States United States
Age: 43
All time rank: 27032 in United States United States
Week rank: 195 Up20 in United States United States Up

  Files folder image Files (3)  
File Role Description
Accessible without login HTML file form.html Data Form file
Accessible without login Plain text file validation.php Example validation test
Plain text file Validator.php Class Class file

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:6,945
This week:0
All time:284
This week:59Up
User Ratings User Comments (2)
 All time
Utility:83%StarStarStarStarStar
Consistency:85%StarStarStarStarStar
Documentation:-
Examples:82%StarStarStarStarStar
Tests:-
Videos:-
Overall:58%StarStarStar
Rank:1397
 
great
8 years ago (Leonel Cuevas Gómez)
67%StarStarStarStar
The most convenient way to validate data.
10 years ago (Roman S)
70%StarStarStarStar