0
我有多個輸入的表單和一個下拉菜單中選擇:如何驗證一個下拉列表中選擇
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
)
)
但是,似乎不工作。我錯在哪裏?
謝謝,似乎工作得很好:) – Axiol