Course Content

Course Content


ng-dirty A change has been made to the field. ng-valid The data in the field is correct. ng-invalid The content of the field is invalid. ng-valid-key Each validation has its own key.

The key difference between them is that ng-dirty indicates that the input field has been edited by the user, whereas ng-pristine indicates that the field has not been modified by the user. Let's try if we can clear everything up with the help of a little example.

The ng-pristine class indicates that the form has not been altered by the user. If the user hasn't changed the form, this returns true. Type of return: Return a Boolean value True if the user hasn't changed the form/input field; otherwise, False.

Client-side form validation is provided by AngularJS. It monitors the state of the form and input fields (input, textarea, select) and allows you to notify the user. It also keeps track of whether or not the input fields have been tampered with or changed.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere