[AngularJS] Re: ng-invalid is applied to empty input elements.

2015-07-01 Thread ken . hilton
Thank you, Sander! I had that idea on the way home last night and was just about to look it up. BTW, contract we use told me manually sets some of the form validation values to deal with similar issues. Is that a best practice, e.g., setting pristine when he knows the form is untouched? Rega

[AngularJS] Re: ng-invalid is applied to empty input elements.

2015-06-30 Thread Sander Elias
Hi Ken, . You can use a combined selector to cancel out the invalid styling. something like: .ng-invalid { border:2px solid red; } .ng-invalid.ng-pristine { border:1px solid black; } You can see it in action here -- You received t

[AngularJS] Re: ng-invalid is applied to empty input elements.

2015-06-30 Thread ken . hilton
To be more clear: the invalid style is applied to the input elements when the form is initially rendered and before the user has had a chance to enter data. My user's don't like this: it's too in your face but I don't see a way around this side effect if I continue to use an ng-invalid style.