PHP Classes
elePHPant
Icontem

Input Validator: Validate of nested arrays using XML schema rules

Recommend this page to a friend!
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2012-05-27 (4 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 396 All time: 6,250 This week: 920Up
Version License PHP version Categories
nestedarrayvalidator 0.1MIT/X Consortium ...5.0XML, PHP 5, Validation
Description Author

This class can validate of nested arrays using XML schema rules.

It can take an example of associative array with valid values and converts it internally to validation rules defined in XML Schema Definitions (XSD).

An actual array of data, which can eventually be the $_POST request values, can be validated with the rules determined from the sample data.

It can also generate a XML Schema Definition file that can be edited separately to add more complex validation rules. The edited XSD file or string can also be used as input to define the validation rules.

The class supports validating values of different types, such as: boolean, integer, float, string, date, time, timestamp, array, object.

Innovation Award
PHP Programming Innovation award nominee
June 2012
Number 4


Prize: One downloadable copy of PhpED Professional
XML Schema (XSD) is a standard for defining rules that XML element values should follow.

This class can validate arrays of values, submitted eventually using Web forms, using rules defined using XML Schema.

It can validate not only all basic types of values but also more complex element types defined as nested arrays.

The initial set of validation rules can be generated from a sample array of valid values that is passed to the class.

This way the class makes it easy to get started defining basic validation rules without requiring to learn too much about XML Schema.

Manuel Lemos
Picture of Tom Schaefer
  Performance   Level  
Name: Tom Schaefer <contact>
Classes: 39 packages by
Country: Germany Germany
Innovation award
Innovation award
Nominee: 9x

Winner: 1x

  Files folder image Files  
File Role Description
Accessible without login Plain text file error_sample2.php Example error: unexpected type
Accessible without login Plain text file error_sample.php Example error: wrong type, expecting boolean, receiving integer
Accessible without login Plain text file error_sample3.php Example undefined key-value pair
Plain text file InputValidator.php Class class
Accessible without login Plain text file sample.php Example interface error sample
Accessible without login Plain text file sample2.php Example json to xsd using trang

 Version Control Unique User Downloads Download Rankings  
 0%
Total:396
This week:0
All time:6,250
This week:920Up