i use label
+ hidden input
.file for customize CSS style.
But when i add a required
attribute , it does not work.
In console log: An invalid form control with name='imageFile'
is not focusable.
.
Is there anyway to fix this without JavaScript ?
<div>
<label for="imageFile" class="button">Image</label>
<input type="file" required id="imageFile" name="imageFile" style="display:none" />
</div>