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.
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.