0

I've generated a form with some default data, when the user clicks on Submit ngValidate should trigger the correspondent css class if data is valid or invalid.

In the following example, the email model as some data that is invalid:

http://plnkr.co/edit/zb74FvMIpHEesOtyzBEz?p=preview

I'd like to know how to make ng-validate trigger the error class (style red background) when the user clicks submit ?

Thanks for looking!

punkbit
  • 7,347
  • 10
  • 55
  • 89
  • http://stackoverflow.com/questions/18798375/show-validation-error-messages-on-submit-in-angularjs does this help you? – Busata Mar 18 '14 at 16:03

1 Answers1

0

The issue, as I understand it, is that the data is being pre-validated and not bound to the input. If it was bound to the input, then it would be shown as invalid automatically.

There is an open issue related to this: https://github.com/angular/angular.js/issues/1412

Tim B
  • 2,340
  • 15
  • 21