认证-参数项-编号校验添加小数点左斜杠空格
This commit is contained in:
+15
-15
@@ -98,12 +98,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
String nioNumber = paramsInfoEO.getNioNumber();
|
||||
String paramsTemplateId = paramsInfoEO.getParamsTemplateId();
|
||||
// 校验nio编号 格式:字母数字横杠(-)
|
||||
String nioNumberRegex = "^[A-Za-z0-9-]+$";
|
||||
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
|
||||
if (!nioNumber.matches(nioNumberRegex)) {
|
||||
if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) {
|
||||
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-)!");
|
||||
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格!");
|
||||
} else {
|
||||
throw new JeroBootException("NIO number formatting errors, can only letters, numbers, dash (-)!");
|
||||
throw new JeroBootException("NIO number formatting errors, can only letters,numbers,dash (-),dot (.),left slash,spaces!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,12 +176,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
String paramsTemplateId = paramsInfoEO.getParamsTemplateId();
|
||||
|
||||
// 校验nio编号 格式:字母数字横杠(-)
|
||||
String nioNumberRegex = "^[A-Za-z0-9-]+$";
|
||||
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
|
||||
if (!nioNumber.matches(nioNumberRegex)) {
|
||||
if (CutEnum.CN.getValue().equals(paramsInfoEO.getCut())) {
|
||||
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-)!");
|
||||
throw new JeroBootException("NIO编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格!");
|
||||
} else {
|
||||
throw new JeroBootException("NIO number formatting errors, can only letters, numbers, dash (-)!");
|
||||
throw new JeroBootException("NIO number formatting errors, can only letters,numbers,dash (-),dot (.),left slash,spaces!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1134,12 +1134,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
countError += (int)resultMap.get("countError");
|
||||
if (StringUtils.isNotEmpty(dto.getNioNumber())) {
|
||||
// 校验nio编号 格式:字母数字横杠(-)
|
||||
String nioNumberRegex = "^[A-Za-z0-9-]+$";
|
||||
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
|
||||
if (!nioNumber.matches(nioNumberRegex)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += "NIO编号格式错误,仅能为字母,数字,横杠(-);";
|
||||
errorMsg += "NIO编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格;";
|
||||
} else {
|
||||
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-);";
|
||||
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-),dot (.),left slash,spaces;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
@@ -1389,12 +1389,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
countError += (int)resultMap.get("countError");
|
||||
if (StringUtils.isNotEmpty(ccDto.getNioNumber())) {
|
||||
// 校验nio编号 格式:字母数字横杠(-)
|
||||
String nioNumberRegex = "^[A-Za-z0-9-]+$";
|
||||
String nioNumberRegex = "^[A-Za-z0-9-/. ]+$";
|
||||
if (!nioNumber.matches(nioNumberRegex)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += "nio编号格式错误,仅能为字母,数字,横杠(-);";
|
||||
errorMsg += "nio编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格;";
|
||||
} else {
|
||||
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-);";
|
||||
errorMsg += "NIO number formatting errors, can only letters, numbers, dash (-),dot (.),left slash,spaces;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
@@ -1420,12 +1420,12 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
||||
countError += (int)resultMap.get("countError");
|
||||
if (StringUtils.isNotEmpty(ccDto.getParamsNumber())) {
|
||||
// 校验编号 格式:字母数字横杠(-)
|
||||
String numberRegex = "^[A-Za-z0-9-]+$";
|
||||
String numberRegex = "^[A-Za-z0-9-/. ]+$";
|
||||
if (!paramsNumber.matches(numberRegex)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += "编号格式错误,仅能为字母,数字,横杠(-);";
|
||||
errorMsg += "编号格式错误,仅能为字母,数字,横杠(-),小数点(.),左斜杠,空格;";
|
||||
} else {
|
||||
errorMsg += "Number formatting errors, can only letters, numbers, dash (-);";
|
||||
errorMsg += "Number formatting errors, can only letters, numbers, dash (-),dot (.),left slash,spaces;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user