AAAAcustom_serverside_validation.ctp 0000666 00000004426 15140117342 0013243 0 ustar 00
Header(array('settings' => 'Settings', 'help' => 'Help'), 'custom_serverside_validation_config_{n}'); ?>
tabStart('settings'); ?>
input('action_custom_serverside_validation_{n}_content1_config', array('type' => 'textarea', 'label' => "Code", 'rows' => 20, 'cols' => 70, 'smalldesc' => 'Returning "boolean" false will fail, anything else or no return at all will lead to success.')); ?>
tabEnd(); ?>
tabStart('help'); ?>
- You should use PHP code with php tags.
- Returning "boolean" false will fail, anything else or no return at all will lead to success.
- Set fields errors by adding a new key => value entry to the $form->validation_errors array, where "key" is the "field name" and "value" is the "Error message", for example, if you want to set an error to the "email" field you should use this code
$form->validation_errros['email'] = "Email error message is here.";.
tabEnd(); ?>