Angular 2’s ngModel provides error objects for each of the built-in input validators. You can access these errors from a reference to the ngModel itself then build useful messaging around them to display to your users.
I'm using WebStorm and i got these error "Angular: Identifier 'required' is not defined. '__type' does not contain such a member". Could you tell how did you fix this problem?