Im having a difficulty to assemble as complex as this password validation rules:
- Shall be at least 8-20 characters:
- Shall have At least one number (0-9)
- Shall contain At least one special characters (!,@,#,$,%...etc)
- No repetition of single character more than 3 times
- No repetition of sequence of characters/numbers more than 2 times.
- No sequence of 4 or more characters (e.g. abcd)
- No sequence of 4 or more numbers (e.g. 1234)
- No sequence of 4 or more keyboard characters (e.g. qwer)
- May not have any of the above spelled backwards.
That maximum i could achieve is the below, its not working as expected, could someone advice:
^[A-Za-z0-9\\S+](?=.*[$@$#!%*?&]){8,20}