I am working on implementing validation in my form using AngularJS. My goal is to have the input box turn entirely red when there is an error. Currently, after I receive an error and delete the text with the cursor still inside the box, the color of the box turns blue while the border remains red. I want the entire box, including the background, to be red in this scenario. Right now, the full red color only appears when I click outside the box, but I want it to display fully red even if no text is present in the box but the cursor is still inside.
.registration-form .has-error .form-control, .registration-form .has-error .form-control:focus, .registration-form .has-error .form-control:hover, .registration-form .has-error .form-control:active{
border-color: red;
box-shadow: none !important;
background-color: red !important;
}
.registration-form label{
font-weight: normal;
}
.registration-form .form-group input[type="text"]:focus{
background-color:#18b6d6 !important;
}
Can someone provide guidance on how to achieve this? If needed, here is a plunker link for reference-