fixed the issue. Will look into that further The $valid and $invalid properties come from the form and not from the value of the input. You need a form element with a name, then also a name into the input, and then use formName.inputName.$valid or $invalid.
AngularJS: How do I manually set input to $valid in controller?
By : 김영민
Date : March 29 2020, 07:55 AM
I wish this help you You cannot directly change a form's validity. If all the descendant inputs are valid, the form is valid, if not, then it is not. What you should do is to set the validity of the input element. Like so;