I used Regex to verify a password with a minimum of 8 characters containing 1 uppercase, 1 lowercase, 1 special character, and 1 numeric value. The problem I encountered is that if people from Russia or any other country whose language is different from English try to enter the password using the default keyboard, it will create a problem for them.
Currently i have set this regex condition for my application :
String regex = "^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$";
It works if the user sets the password in English. But it does not work if the user's language is different. (A password like Испытание@123
will fail).
I searched on google about russian regex for the default keyboard and found a solution for the russian keyboard.
Do i need to work out for all different language for password validation regex?
Is there an alternative solution so that I can check the password check for any default keyboard layout with the password validation that I want?