// 参数验证
if (ReUtil.isMatch(RegConstant.REG_AREACODE_CN, vo.getGlobalCode())) {
if (!ReUtil.isMatch(RegConstant.REG_MOBILE_CN, vo.getMobile())) {
throw new Exception(ResultCode.VALIDATE_FAILED, "手机号码格式不正确");
}
} else if (ReUtil.isMatch(RegConstant.REG_AREACODE_HK, vo.getGlobalCode())) {
if (!ReUtil.isMatch(RegConstant.REG_MOBILE_HK, vo.getMobile())) {
throw new Exception(ResultCode.VALIDATE_FAILED, "手机号码格式不正确");
}
} else if (ReUtil.isMatch(RegConstant.REG_AREACODE_MO, vo.getGlobalCode())) {
if (!ReUtil.isMatch(RegConstant.REG_MOBILE_MO, vo.getMobile())) {
throw new Exception(ResultCode.VALIDATE_FAILED, "手机号码格式不正确");
}
} else if (ReUtil.isMatch(RegConstant.REG_AREACODE_TW, vo.getGlobalCode())) {
if (!ReUtil.isMatch(RegConstant.REG_MOBILE_TW, vo.getMobile())) {
throw new Exception(ResultCode.VALIDATE_FAILED, "手机号码格式不正确");
}
}
网友评论