Skip to content

Commit e8ff2a7

Browse files
committed
#475 allow unicode escapes in name and unit fields
1 parent 1aa9298 commit e8ff2a7

File tree

1 file changed

+1
-1
lines changed
  • tcMenuGenerator/src/main/java/com/thecoderscorner/menu/editorui/uimodel

1 file changed

+1
-1
lines changed

tcMenuGenerator/src/main/java/com/thecoderscorner/menu/editorui/uimodel/UIMenuItem.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ private void checkValidityOfString(String field, List<FieldError> errorsBuilder,
496496
else if(fieldType == VARIABLE && !s.matches("^[\\p{L}_$][\\p{L}\\p{N}_]*$")) {
497497
errorsBuilder.add(new FieldError(bundle.getString("menu.editor.core.variable.invalid"), field, true));
498498
}
499-
else if((fieldType == MANDATORY || fieldType == OPTIONAL) && !s.matches("^[\\p{L}\\p{N}\\s\\-_*%()\\.]*$")) {
499+
else if((fieldType == MANDATORY || fieldType == OPTIONAL) && !s.matches("^[\\p{L}\\p{N}\\s\\-_*%()\\.\\\\]*$")) {
500500
errorsBuilder.add(new FieldError(bundle.getString("menu.editor.core.text.invalid"), field, true));
501501
}
502502
}

0 commit comments

Comments
 (0)