PHP Classes

Validate Formats: Validate string values in different formats

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2015-05-02 (7 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 468 All time: 5,629 This week: 1,142Up
Version License PHP version Categories  
validate-formats 5.0.4Public Domain5.3Networking, PHP 5, Validation
Description Author  

This class can validate string values in different formats and convert strings between some of those formats.

It provides different functions to validate strings for formats like:

- German names
- Base 64 encoded data
- Integer numbers
- Email addresses
- URLs
- MD5 or SHA1 hashes
- UUID identifiers
- OID identifiers
- CSS position or length values
- CSS colors
- etc..

The class can also convert IPv4 and IPv6 addresses to long integer numbers and vice-versa, convert strings to CamelCase or insert whitespace and delimiters into a CamelCasedString.

The validation rules can be altered and extended dynamically by mapping regular expressions or closure functions to user-defined formats.

The class can validate a string against a given format, an array of given formats or all formats the class instance supports.

It can be used in static context as well as in object context.

Picture of Till Wehowski
  Performance   Level  
Name: Till Wehowski <contact>
Classes: 12 packages by
Country: Germany Germany
Age: 37
All time rank: 147897 in Germany Germany
Week rank: 637 Up24 in Germany Germany Up
Innovation award
Innovation award
Nominee: 4x

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example/Test
Accessible without login Plain text file valFormats.php Class Main class

 Version Control Unique User Downloads Download Rankings  
 50%Total:468All time:5,629
 This week:0This week:1,142Up