I'm using WPForms Pro and I'd like to add custom requirements to the password field on a form.
I know that the password field has a password strength requirement setting, but I have specific rules I'd like to enforce, which are:
- Between 12 and 32 characters
- At least 1 number
- At least 1 capital letter
- At least 1 special character
I came up with the following regex for this:
and wrote to WPForms support, who told me that they can only go as far as giving me a code snippet to enforce a minimum length:
(I'd add the
wpf-char-require class to the field I want to validate).
How can I modify this to validate using my regex instead of the rule they've given me?