Validation¶
Validation is the process to check that a data conform to a specific pattern or set of constraints. The data is not modified by a validation process. There are PHP extension and external components to perform validation tasks.
Validation applies to simple values, such as strings or integer; they also apply to larger structures, like XML, JSON or YAML, where the number of simple value is high.
Validation is also called filtering.
<?php
if (intval($string) > 0) {
print "The string is an integer";
}
?>
See also PHP Form Validation.
Related : Sanitation, Parse, Parser, Schema, Specification, filter, parse_url()
Related packages : respect/validation, beberlei/assert, lemmon/validator