后端写校验方法
private void isHalfEnglish(String a1,String b1) {
Pattern p = Pattern.compile("[A-Za-z0-9]+");
Matcher aa = p.matcher(a1);
Matcher bb = p.matcher(b1);
if (aa.matches() == false || bb.matches() == false) {
throw new BusinessException("error");
}
}