JavaScript (JS)

REGEX password must contain letters a-zA-Z and at least one digit 0-9

1) 6-10 characters

2) At least one alpha AND one number

3) The following special chars are allowed (0 or more): !@#$%

^(?=.*\d+)(?=.*[a-zA-Z])[0-9a-zA-Z!@#$%]{6,10}$

to explain it, consider it as 3 individual parts

(?=.*\d+)  ===> the chain must contain a digit

AND

(?=.*[a-zA-Z])  ===> the chain must contain an alpha

AND

[0-9a-zA-Z!@#$%]{6,10}  ===> the chain can only contain digit, alpha and the special characters “!@#$%” with a size limit of {6,10}