Within a div, I have placed three radio buttons with images inline. My goal is to show a validation message using bootstrap when the submit button is clicked and there is no user input.
I attempted to add another div after the radio buttons with the class "invalid-feedback" but the message failed to display.
<div id="mb">
<input type="radio" id="h" value="hancock" name="mb" required>
<label for="h"><img src="static/hancock.jpg" class="img-thumbnail" alt="hancock"></label>
<input type="radio" id="s" value="shirahoshi" name="mb" required>
<label for="s"><img src="static/shirahoshi.png" class="img-thumbnail" alt="shirahoshi"></label>
<input type="radio" id="n" value="nami" name="mb" required>
<label for="n"><img src="static/nami.jpeg" class="img-thumbnail" alt="nami"></label>
<div class="invalid-feedback">Please select one option!</div>
</div>
The invalid feedback text was not displayed as intended.
Edit: For code snippet see https://jsfiddle.net/uv51r3jw/5/. I used the novalidate attribute of form to disable default validation.