Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chapter 7 Hands on [class...]="formModel.hasError(...)" not working #32

Open
canberranet opened this issue Jan 31, 2018 · 2 comments
Open

Comments

@canberranet
Copy link

the validation seems to be working, the form and fields get the ng-valid and ng-invalid class applied. However the has-error never gets applied and [class.hidden]="!formModel.hasError(...)" is not working either

@canberranet
Copy link
Author

need to use the form formModel.hasError('minlength', ['title'])

@yfain
Copy link
Member

yfain commented Feb 2, 2018

I'll take a look, thanks. Meanwhile, take a look at the validator samples in the 2nd edition of this book. They're in chapter 11 at https://github.com/Farata/angulartypescript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants