セット内のすべてのチェックボックスを必須にしたい
私のコードは次のようになります。
$this->widgetSchema['consent_confirmation'] = new sfWidgetFormSelectCheckbox(
array(
'choices' => Doctrine_Core::getTable('MyTable')->getOptions(),
)
);
アップデート:
私の検証は次のようになります。
$this->validatorSchema['consent_confirmation'] = new sfValidatorChoice(array(
'choices' => array(Doctrine_Core::getTable('MyTable')->getOptions()),
'multiple' => true,
'required' => true
));
すべてがチェックされていない場合は「必須」を返し、すべてがチェックされている場合は有効にするにはどうすればよいですか?