fnakstad / angular-client-side-auth

One way to implement authentication/authorization in Angular applications
http://angular-client-side-auth.herokuapp.com/
MIT License
1.63k stars 346 forks source link

Suppress error messages for validation till the user has actually entered input #26

Closed fnakstad closed 11 years ago

fnakstad commented 11 years ago

Per comment from Matthew:

Thanks for taking the time to post your solution online! I implemented it this afternoon and it works nicely. I modified register.jade so that it does not show validation errors when you first click on it. Once you start to type in the fields it performs the validation and if invalid, the messages show. I like suppressing validation messages until the user starts to type. Here is what I changed (I added registerForm.$dirty &&):

.alert.alert-error(ng-show="registerForm.$dirty && registerForm.$invalid")

fnakstad commented 11 years ago

Fixed in d30a63f214a8c15792bc5f9a6921a3926a27b1f9