我有一个包含多个输入和下拉选择的表单:
echo $this->Form->input("field",array(
"name" => "data[Post][project_id]",
"options" => $proTab,
"empty" => "Sélectionnez un projet",
"div" => "control-group",
"label" => array(
"class" => "control-label",
"text" => "Projet : "
),
"between" => "<div class='controls'>",
"after" => "</div>"
));
从一个用户到另一个用户有不同的选择。
我试图像这样验证它:
"data[Post][project_id]" => array(
array(
"rule" => "notEmpty",
"message" => "Veuillez choisir un projet",
"allowEmpty" => false
)
)
但是,似乎不起作用。我哪里错了?