public class IllegalRegexRule extends Object implements Rule
Modifier and Type | Field and Description |
---|---|
static String |
ERROR_CODE
Error code for regex validation failures.
|
protected Pattern |
pattern
Regex pattern.
|
protected boolean |
reportAllFailures
Whether to report all sequence matches or just the first.
|
Constructor and Description |
---|
IllegalRegexRule(String regex)
Creates a new illegal regex rule.
|
IllegalRegexRule(String regex,
boolean reportAll)
Creates a new illegal regex rule.
|
IllegalRegexRule(String regex,
int regexFlags)
Creates a new illegal regex rule.
|
IllegalRegexRule(String regex,
int regexFlags,
boolean reportAll)
Creates a new illegal regex rule.
|
Modifier and Type | Method and Description |
---|---|
protected Map<String,Object> |
createRuleResultDetailParameters(String match)
Creates the parameter data for the rule result detail.
|
Pattern |
getPattern()
Returns the pattern for this rule.
|
String |
toString() |
RuleResult |
validate(PasswordData passwordData)
Validates the supplied password data per the requirements of this rule.
|
public static final String ERROR_CODE
protected final Pattern pattern
protected boolean reportAllFailures
public IllegalRegexRule(String regex)
regex
- regular expressionpublic IllegalRegexRule(String regex, int regexFlags)
regex
- regular expressionregexFlags
- regular expression flagspublic IllegalRegexRule(String regex, boolean reportAll)
regex
- regular expressionreportAll
- whether to report all matches or just the firstpublic IllegalRegexRule(String regex, int regexFlags, boolean reportAll)
regex
- regular expressionregexFlags
- regular expression flagsreportAll
- whether to report all matches or just the firstpublic Pattern getPattern()
public RuleResult validate(PasswordData passwordData)
Rule
protected Map<String,Object> createRuleResultDetailParameters(String match)
match
- matching regexCopyright © 2003-2024 Virginia Tech. All Rights Reserved.