I am using the bootrap validator library: http://1000hz.github.io/bootstrap-validator/
I have a form which includes a modal/ajax upload for a file, the result of which is to update a hidden field with a mediaId. That means that after the user completed uploading a file, my JS code sets the input field mediaId with some id.
I need to make sure the user has uploaded an image so I added required to the hidden field as follows:
<div class="form-group">
<input id="mediaId" name="mediaId" required="true" type="hidden" value=""/>
<div class="help-block with-errors"></div>
</div>
But unfortunately, no error message is shown and the user can submit the form. How to tack?