AngularJS Form Validation CSS Classes


Angular also provides some CSS classes for forms and inputs depending on their state

ng-touchedField has been touched
ng-untouchedField has not been touched
ng-pristineField has not been modified
ng-dirtyField has been modified
ng-validField is valid
ng-invalidField is invalid

You can use these classes to add styles to your forms {
  background-color: crimson;
} {
  background-color: green;