Javatpoint Logo

91-9990449935

 0120-4256464

AngularJS Form Validation

AngularJS provides client-side form validation. It checks the state of the form and input fields (input, textarea, select), and lets you notify the user about the current state.

It also holds the information about whether the input fields have been touched, or modified, or not.

Following directives are generally used to track errors in an AngularJS form:

  • $dirty - states that value has been changed.
  • $invalid - states that value entered is invalid.
  • $error - states the exact error.

AngularJS Form Validation Example

Next TopicAngularJS AJAX