一 登录密码输入检测排除特殊字符和非合法字符的输入检测
String pwd = mPwdEtn.getText.toString().trim();
boolean isPwd = pwd .matches("[^\u4E00-\u9FA5]{6,16}"
if(!isPwd ){
//请输入有效的密码
}
二 检测有效手机号码的方法
private boolean isTelPhoto(String mobiles) {
Pattern p = Pattern
.compile("^((13[0-9])|(15[^4,\\D])|(18[0-9])|(17[0-9]))\\d{8}$");
Matcher m = p.matcher(mobiles);
return m.matches();
}