12
AngularJS Forms using ASP.NET MVC + Bootstrap C# Corner - Delhi Chapter 2 nd Aug-2015

AngularJS Forms Validation

Embed Size (px)

Citation preview

Page 1: AngularJS Forms Validation

AngularJS Forms using

ASP.NET MVC + Bootstrap

C# Corner - Delhi Chapter 2nd Aug-2015

Page 2: AngularJS Forms Validation

Agenda• Bootstrap validation classes• Angular validation classes• Angular Validation Directives• How to use them?

Page 3: AngularJS Forms Validation

Bootstrap validation classes• has-success

• has-warning

• has-error

Page 4: AngularJS Forms Validation

Angular validation classes

• ng-valid

• ng-invalid

• ng-pristine

• ng-dirty

• ng-touched

• ng-untouched

Page 5: AngularJS Forms Validation

Angular Validation Directives

ng-required ng-minlength ng-maxlength ng-pattern

Input Types: email url number

Page 6: AngularJS Forms Validation

$valid (the field value is VALID)

Page 7: AngularJS Forms Validation

$invalid (the field value is NOT VALID)

Page 8: AngularJS Forms Validation

$pristine(the control is yet to interact)

Page 9: AngularJS Forms Validation

$dirty(the field value has CHANGED)

Page 10: AngularJS Forms Validation

ng-touched (the control is tabbed off)

Page 11: AngularJS Forms Validation

ng-untouched(the control has not been tabbed off)

Page 12: AngularJS Forms Validation

Thank You!