@Documented @Constraint(validatedBy=PasswordValidator.class) @Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER}) @Retention(value=RUNTIME) public @interface Password
null elements
are considered valid.minRules parameter the number rules can
be defined that have to be fulfilled):
blacklist you can give a comma separated list of words which are not allowed
to be part of the password. Default is no entry.disalowedStartChars you can define characters which are not allowed as first
character in the password. Default is no entry.maxRepeatChar you can limit the repeat of a single character, default is 0
which means no limitation.| Modifier and Type | Required Element and Description |
|---|---|
int |
minRules
minimum number rules that have to be fulfilled.
|
| Modifier and Type | Optional Element and Description |
|---|---|
String |
blacklist
Comma separated list of words which are not allowed as part of the password.
|
String |
disalowedStartChars
Characters which are not allowed at the beginning of a password.
|
Class<?>[] |
groups
groups to use.
|
int |
maxRepeatChar
maximum repeats of a single character.
|
String |
message
localized message.
|
String |
messageBlacklist
localized message if blacklisted.
|
String |
messageMaxRepeat
localized message if maximum repeat of a char is reached in a row.
|
String |
messageStartCharacters
localized message if start character is not allowed.
|
Class<? extends javax.validation.Payload>[] |
payload
payload whatever.
|
public abstract int minRules
public abstract String message
public abstract String messageBlacklist
public abstract String messageStartCharacters
public abstract String messageMaxRepeat
public abstract Class<?>[] groups
public abstract String blacklist
public abstract String disalowedStartChars
public abstract Class<? extends javax.validation.Payload>[] payload
Copyright © 2015–2016. All rights reserved.