diff --git a/modules/web/src/com/haulmont/addon/sdbmt/web/tenant/messages.properties b/modules/web/src/com/haulmont/addon/sdbmt/web/tenant/messages.properties index 7d9b0dc..981b074 100644 --- a/modules/web/src/com/haulmont/addon/sdbmt/web/tenant/messages.properties +++ b/modules/web/src/com/haulmont/addon/sdbmt/web/tenant/messages.properties @@ -30,4 +30,4 @@ createTenantRootGroupButton.caption=Generate group validation.cannotGenerateGroupNameIsNull=Please enter a tenant name first validation.tenantGroupAlreadyExist=Access group with the name "%s" already exists -validation.invalidTenantId=The field "Tenant Id" must contain Latin letters, numbers or "_" \ No newline at end of file +validation.invalidTenantId=The field "Tenant Id" must contain Latin letters, numbers, "_" or "-" \ No newline at end of file diff --git a/modules/web/src/com/haulmont/addon/sdbmt/web/tenant/validators/TenantIdValidator.java b/modules/web/src/com/haulmont/addon/sdbmt/web/tenant/validators/TenantIdValidator.java index 967edbf..0a0e498 100644 --- a/modules/web/src/com/haulmont/addon/sdbmt/web/tenant/validators/TenantIdValidator.java +++ b/modules/web/src/com/haulmont/addon/sdbmt/web/tenant/validators/TenantIdValidator.java @@ -28,7 +28,7 @@ public class TenantIdValidator implements Field.Validator { @Override public void validate(Object value) throws ValidationException { - if (StringUtils.isNotEmpty((String) value) && !((String) value).matches("[\\w|\\s]+")) + if (StringUtils.isNotEmpty((String) value) && !((String) value).matches("[\\w|\\s\\-]+")) throw new ValidationException(messages.getMessage(TenantIdValidator.class, "validation.invalidTenantId")); } }