How to add password validation using regular expression in angularjs according to certain criterion?
问题 I want to validate password entered by user for following criteria : Password should be at least 8 characters long and should contain one number,one character and one special character. For it I used following regular expression : ^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$ I tried this expression in my angularjs code as below : <md-input-container class="md-block" style="margin-top:0px;"> <label>Password</label> <md-icon md-svg-src="/images/icons/ic_lock_black_24px.svg"