I have following Angular 2 form:
&l 相关标签:
The error key is minlength and not minLength:
minLength
<div *ngIf = "password.hasError('minlength') && !password.hasError('required')" class = "alert alert-danger"> <span>Password should contain 6 characters</span> </div>