有沒有什麼辦法讓不要求在CakePHP中 我已經試過allowEmpty設置爲true,並FLASE必需的,但沒有奏效可選的文件上傳驗證
'pic' => array(
'uploadError'=>array(
'rule'=>'uploadError',
'message'=>'The image upload failed',
'allowEmpty'=>true
)
)
的可能重複[CakePHP的表單驗證只在輸入數據(http://stackoverflow.com/questions/24094712/cakephp-form-validation-only-on-entering-data) – ndm 2014-10-09 20:19:02