I am trying to Upload a photo for one of the models and when i am going to the edit mode. It still asks me to upload the photo when the user only wants to edit the text rela
set the parameter
'on' => 'create'
just for the 'uploadError'
rule
'uploadError' => array(
'rule' => array('uploadError'),
'message' => 'Please select a Photo.',
'on' => 'create',
),
This way cake will force the user to upload an image just when the record is created.
The other validation rules, intead, will always be valid, but only if a file is actually uploaded.
see the manual