mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
add validation pattern for permission name
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package sonia.scm.api.v2;
|
||||
|
||||
public class ValidationConstraints {
|
||||
|
||||
/**
|
||||
* A user or group name should not start with the @ character
|
||||
* and it not contains whitespaces
|
||||
* the characters: . - _ are allowed
|
||||
*/
|
||||
public static final String USER_GROUP_PATTERN = "^[^@][A-z0-9\\.\\-_]|([A-z0-9\\.\\-_]*[A-z0-9\\.\\-_])?$";
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user