I have an issue while trying to implement ng-file-upload
of Angular.js and my problem is i am not getting any validation message while uploading wrong file.My explaining my code below.
<form name="billdata" id="billdata" enctype="multipart/form-data" novalidate>
<div class="input-group bmargindiv1 col-md-12" ng-show="status==1">
<div ng-class="{ 'myError': billdata.bannerimage.$touched && billdata.bannerimage.$invalid }">
<div class="image-upload text-center">
<label for="imagefile1">
<img ng-src="{{attchImage1}}" style="cursor:pointer;width:auto; height:160px; border:1px #666 solid"/>
</label>
<input type="file" data-size="lg" name="bannerimage" id="imagefile1" ng-model="file" ngf-pattern="image/*" accept="image/*" ngf-max-size="2MB" ngf-min-height="100" ngf-resize="{width:100, height:100}" custom-on-change="uploadFile" ngf-select="onFileSelect($file);" >
<div class="input-group bmargindiv1 col-md-12">
<label for="imagefile1" >
<span style="color:#00F; font-style:italic; cursor:pointer"> Click here to upload Image </span>
<input type="hidden" name="someData" ng-model="imageData" />
</label>
</div>
</div>
</div>
</div>
<div class="help-block" ng-messages="billdata.bannerimage.$error" ng-if="billdata.bannerimage.$touched">
<p ng-message="maxSize" style="color:#F00;">File is too large.Max size is 2 mb.</p>
<p ng-message="minHeight" style="color:#F00;">Minimum height should be 100px</p>
</div>
</form>
Here when i am uploading the wrong file size(i.e-min-height<100px
) the validation error message should display but its not coming at all.Please help me to resolve this issue.