diff --git a/Kitodo/src/main/java/org/kitodo/config/enums/ParameterCore.java b/Kitodo/src/main/java/org/kitodo/config/enums/ParameterCore.java index 36a3ac2e159..46b05fa1640 100644 --- a/Kitodo/src/main/java/org/kitodo/config/enums/ParameterCore.java +++ b/Kitodo/src/main/java/org/kitodo/config/enums/ParameterCore.java @@ -367,7 +367,7 @@ public enum ParameterCore implements ParameterInterface { /** * Validation of process title via regular expression. */ - VALIDATE_PROCESS_TITLE_REGEX(new Parameter<>("validateProzessTitelRegex", "^[a-zA-Z0-9_-]+$")), + VALIDATE_PROCESS_TITLE_REGEX(new Parameter<>("validateProzessTitelRegex", "^[\\w-]+$")), /** * Validation of the identifier via regular expression. diff --git a/Kitodo/src/main/resources/kitodo_config.properties b/Kitodo/src/main/resources/kitodo_config.properties index 9fe425ec510..e7cce828c6c 100644 --- a/Kitodo/src/main/resources/kitodo_config.properties +++ b/Kitodo/src/main/resources/kitodo_config.properties @@ -404,7 +404,7 @@ numberOfMetaBackups=8 useMetadatenvalidierung=true # Validierung der Vorgangstitel ueber regulaeren Ausdruck -validateProzessTitelRegex=[\\w-]* +validateProzessTitelRegex=^[\\w-]+$ # Validierung des Identifiers ueber regulaeren Ausdruck # Regular Expression for validating the identifier diff --git a/Kitodo/src/test/java/org/kitodo/production/forms/copyprocess/CreateProcessFormIT.java b/Kitodo/src/test/java/org/kitodo/production/forms/copyprocess/CreateProcessFormIT.java index 260e2cea86e..097954f0120 100644 --- a/Kitodo/src/test/java/org/kitodo/production/forms/copyprocess/CreateProcessFormIT.java +++ b/Kitodo/src/test/java/org/kitodo/production/forms/copyprocess/CreateProcessFormIT.java @@ -12,7 +12,10 @@ package org.kitodo.production.forms.copyprocess; import static org.awaitility.Awaitility.await; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.File; import java.net.URI;