限制用户名只能是中文

1 String reg = "[\\u4e00-\\u9fa5]+";
2    if (!userName.matches(reg)) {
3    makeToast("用户名只能是中文!");
4 } 

 

posted on 2016-11-01 13:44  小阿仙的fans  阅读(108)  评论(0)    收藏  举报

导航