BWSnippet

Yii Model allow empty -

Yii Model allow empty -

Yii how to allow empty for certain properties

'allowEmpty'=>true


public function rules()
{
 ..
 ..
 return array(
   array('anImageOrSomething', 'file','allowEmpty'=>true,'types'=>'jpg, gif, png'),	
 );

}

Tags

Yii Model allow empty -