a little more detail ...
The idea is validate all fields (print error messages) and have 1 summary status.
PHP Version 4.3.3RC1
function validate_field( $field_name, $field_parameters )
{
...
}
function validate_fields()
{
global $a_validation;
$status = true;
foreach( $a_validation as $key => $value )
{
$status = $status && validate_field( $key, $value );
//$status = false; // Testing!!! Does foreach() choke on this? YES!!!
}
return $status;
}
...
if( !validate_fields() )
exit( "<br>Please go back and fix these errors." );