PHP Classes

Validate Formats: Validate string values in different formats

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 522 All time: 5,700 This week: 140Up
Version License PHP version Categories
validate-formats 5.2.6Public 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: 30 packages by
Country: Germany Germany
Age: 45
All time rank: 107269 in Germany Germany
Week rank: 49 Up3 in Germany Germany Up
Innovation award
Innovation award
Nominee: 12x

Example

<?php
require 'valFormats.php';

webdof\valFormats::create()
      ->
test()
 ;

?>


  Files folder image Files (4)  
File Role Description
Files folder imagewebfan (1 file)
Accessible without login Plain text file example.php Example Example/Test
Accessible without login Plain text file SumaTag.php Class Class source
Accessible without login Plain text file valFormats.php Class Main class

  Files folder image Files (4)  /  webfan  
File Role Description
  Accessible without login Plain text file APIClient.php Class Class source

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  
 75%
Total:522
This week:0
All time:5,700
This week:140Up