public class RegexpNameValidator extends Object implements NameValidator
Modifier and Type | Field and Description |
---|---|
static String |
ID_PATTERN
Convenience pattern for an id.
|
static String |
PASSWORD_PATTERN
Convenience pattern for a password consisting of at least 6 characters.
|
Constructor and Description |
---|
RegexpNameValidator(String aPattern,
String aReason,
String aMessage)
Convenience constructor with all string parameters.
|
RegexpNameValidator(String aPattern,
UserMgtException.Reason aReason,
String aMessage)
Validates a regular expression.
|
public static final String ID_PATTERN
public static final String PASSWORD_PATTERN
public RegexpNameValidator(String aPattern, UserMgtException.Reason aReason, String aMessage)
aPattern
- Pattern that names must comply to.aReason
- Reason to report when validation fails.aMessage
- Message to report.public boolean validate(String aName)
NameValidator
validate
in interface NameValidator
aName
- NameCopyright © 2022. All rights reserved.