Hi using angular 2 for password field I have to set " Password should have at least 1 uppercase, 1 lowercase, 1 number, 1 special character, minimum of 8 characters, and maximum of 16 characters"
In that I have done "minimum of 8 characters, and maximum of 16 characters".
But I am unable to set for remaining things least 1 uppercase, 1 lowercase, 1 number, 1 special character.
<div class ="form-group">
<label> Password </label>
<input class ="form-control" name ="password" #password="ngModel" [(ngModel)] = "angulaService.selectedAngula.password"
placeholder="password" minlength="8" maxlength="16" >
<div class="form-control-feedback"
*ngIf="password.errors && (password.dirty || password.touched)">
<p *ngIf="password.errors.required">Password is required</p>
<p *ngIf="password.errors.minlength">Password must be min 8 characters long</p>
</div>
<div class="form-control-feedback"
*ngIf="password.errors && (password.dirty || password.touched)">
<p *ngIf="password.errors.required">Password is required</p>
<p *ngIf="password.errors.maxlength">Password should not be greater than 16 characters long</p>
</div>
</div>
Please help me in this
Thanks in Advance