I am using jQuery validation plugin and I want to create a password strength regex using data-rule-pattern
to validate the field and can't make it work at all.
I want the password to have minimum:
- 8 characters
- 1 uppercase letter
- 1 number
So far I have:
<p class="controls">
<input data-rule-pattern="(^$)|([a-z][A-Z]{1}[0-9]{1}$)" data-msg-pattern="Password does not meet the minimum requirments." id="password" type="password" data-rule-required="true" value="" />
</p>
The other simple validations are working ok, but can't get this one done. Can anyone help please with some ideas? Thanks!