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