Jun 19th, 2010, 3:01 PM
Hey Ben,
thank you for your support!
Since it is possible to define individual error-messages for each rule, I will use them to track back the field where the error occured.
So in my example this would be:
That's good enough for the moment.
But thanks a lot for your offer!
Hannes.
thank you for your support!
Since it is possible to define individual error-messages for each rule, I will use them to track back the field where the error occured.
So in my example this would be:
PHP Code:
<?php
$rules[] = "required,Name,Error-Msg for Name";
$rules[] = "required,Email,Error-Msg for Email";
?>
...
<?php if (in_array("Error-Msg for Name", $errors)) {?>red mark<?php } else{?>regular<?php }?>
....
<?php if (in_array("Error-Msg for Email", $errors)) {?>red mark<?php } else{?>regular<?php }?>
That's good enough for the moment.
But thanks a lot for your offer!
Hannes.