Im writing a validation class for ZC, (already finished but havent posted yet) you can have a look if you want.
https://svn.rubikintegration.com/zen...validation.php
For example, to check if the customers_email_address passed in POST is not empty and is valid email:
PHP Code:$yvalidation = new yvalidation();
$rules = array('customers_email_address' => array(array('validation_is_not_empty'=>''),
array('validation_is_email'=>'')));
$yvalidation->set_params($_POST);
$yvalidation->set_rules($rules);
$error_counter = $yvalidation->run(); // store the number of errors here
Multiple fields can be checked at once, each field can be checked against multiple rules.




