Creating Rules with the PasswordUtils Extension

I downloaded the PasswordUtils extension and made some modifications for password validation.
I just used the rules:
1 - if all conditions are positive (error = 1);
2 - if the quantity is more than 8 characters (error = -2);
3 - if it contains uppercase letters, lowercase letters, special characters and numbers (error = -4);

I used the label component to specify each item associated with a “check” image for accepted conditions and “error” for unaccepted conditions.

Follow the blocks

image

The rules are not working for any of the errors (1, -2 and -4).

Can anyone help me?

You have used separate if-else blocks to handle different error cases. Use a single if-else if-else chain