Hi I am very new for android and in my app I have Validations for Change password page.
That means the Password must contain minimum 8 characters at least 1 Alphabet
public static boolean isValidPassword(String s) {
Pattern PASSWORD_PATTERN
= Pattern.compile(
"[a-zA-Z0-9\\!\\@\\#\\$]{8,24}");
return !TextUtils.isEmpty(s) && PASSWORD_PATTERN.matcher(s).matches();
}
to use it,
if(isValidPassword(password)){ //password valid}
You can set whatever symbol that you allowed here