Image Validation Clientoptions not working?


I need Image Validation without Page refresh Input type text & select box it’s working fine, But image Validation Working after only form submit only.

My Coding ,

Enable validateOnSubmit true.

<?php $form=$this->beginWidget(‘CActiveForm’, array(






						'htmlOptions' =&gt; array('enctype' =&gt; 'multipart/form-data',



					)); ?&gt;

Once Image upload wrong format need to show the validation error without page refresh how to show like?

Please Anyone tell me Is it possible or not AsAp.Because Am trying to fix this issue more than 4 hours.

Hi Geetha,

You may use this file validation to model file

['image', 'file', 'allowEmpty'=>true, 'types'=>'jpg,jpeg,gif,png']

For more detailed info you may refer the link ->