Class PasswordValidator
- java.lang.Object
-
- de.knightsoftnet.validators.shared.impl.PasswordValidator
-
public class PasswordValidator extends Object implements javax.validation.ConstraintValidator<Password,Object>
Check passwords if they fulfill some complexity rules.- lowercase
- upercase
- digits
- special character
blacklistyou can give a array of words which are not allowed to be part of the password. Default is no entry.
UsingdisalowedStartCharsyou can define an array of characters (String) which are not allowed as first character in the password. Default is no entry.
WithmaxRepeatCharyou can limit the repeat of a single character, default is 0 which means no limitation.
size limits should be added by separate size annotation.- Author:
- Manfred Tremmel
-
-
Constructor Summary
Constructors Constructor Description PasswordValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(Password pconstraintAnnotation)initialize the validator.booleanisValid(Object pvalue, javax.validation.ConstraintValidatorContext pcontext)check if given object is valid.
-