03.05 php saved
i0n4s
Tags add more
1.2.0.4451, alpha, cakephp, checkbox, form and validation  
Note
CakePHP 1.2.0.4451alpha

Working Checkbox Validation.
  1. // View:
  2.     <?php echo $form->input('Person/accepted_tos', array('label' => 'Benutzungs...',
  3.                                                          'type' => "checkbox",
  4.                                                          array('checked' => '',
  5.                                                                'value' => '1'),
  6.                                                          'error' => 'Den Benutzungsbedinungen muss zugestimmt werden.'))?>
  7.  
  8.  
  9.  
  10. // Model:
  11.         'accepted_tos' => array(
  12.             'rule'     => array('custom', '/1/')
  13.         )
  14.  
Parsed in 0.041 seconds, using GeSHi 1.0.7.14

Modify this Paste