Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for hyphen '-' character #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 "_"
validation.invalidTenantId=The field "Tenant Id" must contain Latin letters, numbers, "_" or "-"
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
}