Hi
How to connect CMultiFileUpload and validate-engine?
Example:
<?php $this->widget('CMultiFileUpload', array(
'attribute' => 'path',
'name' => 'path',
'model'=> $model,
'htmlOptions' => array('data-validation-engine' => 'validate[required, funcCall[check_photo[]]]'),
...
)); ?>
<script>
$(...).validationEngine();
function check_photo(field, rules, i, options) {
if($('.MultiFile-label').length == 0) {
return 'Not select photos/images';
}
}
</script>
not wrong.