模型形状导入,去掉形状名称的特殊字符导入校验
This commit is contained in:
parent
b831b5c3a1
commit
df51a1e4c9
Binary file not shown.
@ -28,14 +28,15 @@ public class ValidShapeName implements ValidShapeCell {
|
|||||||
if (value.length() > 128) {
|
if (value.length() > 128) {
|
||||||
msg = "长度不允许超过128";
|
msg = "长度不允许超过128";
|
||||||
} else {
|
} else {
|
||||||
String regEx = "[ _`~!@#$%^&*()+=|{}'\":;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?]|\n|\r|\t";
|
isOk = true;
|
||||||
Pattern p = Pattern.compile(regEx);
|
// String regEx = "[ _`~!@#$%^&*()+=|{}'\":;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?]|\n|\r|\t";
|
||||||
Matcher m = p.matcher(value);
|
// Pattern p = Pattern.compile(regEx);
|
||||||
if (m.find()) {
|
// Matcher m = p.matcher(value);
|
||||||
msg = "名称不允许包含" + "|'\"。、,+*/%^=\\!&:;~`#<>$" + "等字符";
|
// if (m.find()) {
|
||||||
} else {
|
// msg = "名称不允许包含" + "|'\"。、,+*/%^=\\!&:;~`#<>$" + "等字符";
|
||||||
isOk = true;
|
// } else {
|
||||||
}
|
// isOk = true;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.put("isOk", isOk);
|
result.put("isOk", isOk);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user