Package org.passay
Class RepeatCharacterRegexRule
- java.lang.Object
-
- org.passay.IllegalRegexRule
-
- org.passay.RepeatCharacterRegexRule
-
- All Implemented Interfaces:
Rule
public class RepeatCharacterRegexRule extends IllegalRegexRule
Rule for determining if a password contains a duplicate ASCII keyboard sequence. SeePattern
/p{ASCII}. The default sequence length is 5 characters.- Sequences are of the form: 'bbbbb' or '#####'
- Author:
- Middleware Services
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_SEQUENCE_LENGTH
Default length of sequence, value is 5.static int
MINIMUM_SEQUENCE_LENGTH
Minimum length of sequence, value is 3.protected int
sequenceLength
Number of characters in sequence to match.-
Fields inherited from class org.passay.IllegalRegexRule
ERROR_CODE, pattern, reportAllFailures
-
-
Constructor Summary
Constructors Constructor Description RepeatCharacterRegexRule()
Creates a new repeat character regex rule with the default sequence length.RepeatCharacterRegexRule(int sl)
Creates a new repeat character regex rule.RepeatCharacterRegexRule(int sl, boolean reportAll)
Creates a new repeat character regex rule.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getSequenceLength()
Returns the sequence length for this rule.-
Methods inherited from class org.passay.IllegalRegexRule
createRuleResultDetailParameters, getPattern, toString, validate
-
-
-
-
Field Detail
-
DEFAULT_SEQUENCE_LENGTH
public static final int DEFAULT_SEQUENCE_LENGTH
Default length of sequence, value is 5.- See Also:
- Constant Field Values
-
MINIMUM_SEQUENCE_LENGTH
public static final int MINIMUM_SEQUENCE_LENGTH
Minimum length of sequence, value is 3.- See Also:
- Constant Field Values
-
sequenceLength
protected int sequenceLength
Number of characters in sequence to match.
-
-
Constructor Detail
-
RepeatCharacterRegexRule
public RepeatCharacterRegexRule()
Creates a new repeat character regex rule with the default sequence length.
-
RepeatCharacterRegexRule
public RepeatCharacterRegexRule(int sl)
Creates a new repeat character regex rule.- Parameters:
sl
- sequence length
-
RepeatCharacterRegexRule
public RepeatCharacterRegexRule(int sl, boolean reportAll)
Creates a new repeat character regex rule.- Parameters:
sl
- sequence lengthreportAll
- whether to report all matches or just the first
-
-