Commit 6df0c809 by 林冲

feat:字段长度校验

1 parent d8a2a9d2
......@@ -399,9 +399,9 @@ public class EvalElectronicContractService {
if (row.getPlateNo().length() > 10) {
errors.add("车牌号不能超过10位");
}
// 车架号必须是16位或17位
if (row.getVin().length() != 16 && row.getVin().length() != 17) {
errors.add("车架号必须是16位或17位");
// 车架号必须是17位
if (row.getVin().length() != 17) {
errors.add("车架号必须是17位");
}
// 车架号必须是大写英文字符+数字
if (!row.getVin().matches("^[A-Z0-9]{16,17}$")) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!