I used kartik's custom file input it is working fine for me except validation,this is reference site from where i taken this extension https://github.com/kartik-v/yii2-widget-fileinput Here is my code,
echo '<label class="control-label">Video</label>';
echo FileInput::widget([
'model' => $model,
'attribute' => 'VideoURL',
'options' => ['multiple' => false],
'pluginOptions' => [
'allowedFileExtensions'=>['mp4'],
'showPreview' => false,
'showRemove' => false,
'showUpload' => false,
'minFileCount' => 1
],
]);
Now how can i validate it if file input is blank ? Can anyone please tell me what is solution for this ?