Skip to main content

strongPassword

Minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character.

const validator = new JustValidate('#form');

validator.addField('#password', [
{
rule: 'strongPassword',
},
]);
caution

Please note, the rule doesn't trigger the validation error if the field is empty. If you want to make it required you should also add required rule

Demo