It is very simple web page. I just want to change the background colour of validation Error input. i followed same code from ASPNET Core book and JQuery own website. But doesn't work
@section scripts {
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("input.input-validation-error").addClass("bg-warning");
});
</script>
}
form input is
<div class="input-group mb-1" id="DivPrnReason">
<label for="Location" class="col-sm-12 form-control-plaintext">What PRN was given?</label>
<div class="col-sm-6 col-md-10 col-lg-10 ">
<input asp-for="PRNReason" class="form-control" type="text" placeholder="What">
</div>
</div>
After Submitting the page there is no error but class updated with "input-validation-error" but bg-warninig didn't added to the class.