Exploring Bootstrap features has led me to wonder if there's a straightforward method to change the styling of a field specifically when it is considered invalid.
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="22404d4d56515650435262170c100c11">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<div class="container">
<form class="needs-validation was-validated" novalidate>
<label for="sample" class="form-label">Number</label>
<input type="number" class="form-control" id="sample" min="1" step="1" required />
</form>
</div>
The code snippet I'm tinkering with currently allows me to toggle the input field's color between green and red based on its validity. However, my goal is for the field to only turn red when it's invalid and remain gray (without the green check mark) when valid.