Model Rules Confusion

I’m in trubble with model rules.

In my rules :


array('photoMain, photoFirst , photoSecond', 'file', 'types'=>'jpg, gif, png')

after triyng to validate , i got an error :

Why is this required ? i haven’t made these field “required” in my rules!!!

Maybe add:


array('photoMain, photoFirst , photoSecond', 'file', 'allowEmpty'=>true, 'types'=>'jpg, gif, png')

The default value of ‘allowEmpty’ is false, which means it is required.

IMO thats is good thing you should only try upload or run second validation if there is a file available

thank you , it worked ! O0 i supposed that there would be required if only will be required validator ! A lot of thanks ! O0