In the bootstrap docs it states:
You may provide custom validity messages with setCustomValidity in JavaScript.
I read this to mean that the validity mesage will populate the .is-invalid element when validation is called.
my example is as follows:
<script type="text/javascript">
const myForm = $("#my-form").get()[0];
const myInput = $("#my-input").get()[0];
myInput.setCustomValidity("Error");
myForm.checkValidity();
</script>
<form id="myform" novalidate>
<div class="form-group">
<label for="myInput" class="control-label">Input:</label>
<input class="form-control" id="myInput">
<span class="invalid-feedback"></span>
</div>
</form>
I would expect the validation to be triggered and for the message to populate the '.invalid-feedback' but it does not.
Am I missing something?