public class MinSizeConstraint extends AbstractConstraint
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_INVALID_MIN_SIZE_MESSAGE |
static String |
DEFAULT_INVALID_MIN_SIZE_MESSAGE_CODE |
static String |
VALIDATION_DSL_NAME |
classShortName, constraintOwningClass, constraintParameter, constraintPropertyName, messageSource
EXCEEDED_SUFFIX, INVALID_SUFFIX, NOT_PREFIX, NOTMET_SUFFIX, TOOBIG_SUFFIX, TOOLONG_SUFFIX, TOOSHORT_SUFFIX, TOOSMALL_SUFFIX
Constructor and Description |
---|
MinSizeConstraint() |
Modifier and Type | Method and Description |
---|---|
int |
getMinSize() |
String |
getName() |
protected void |
processValidate(Object target,
Object propertyValue,
Errors errors) |
void |
setParameter(Object constraintParameter)
The parameter which the constraint is validated against.
|
boolean |
supports(Class<?> type)
Returns whether the constraint supports being applied against the specified type;
|
checkState, getDefaultMessage, getParameter, getPropertyName, isValid, rejectValue, rejectValue, rejectValue, rejectValue, rejectValue, rejectValueWithDefaultMessage, setMessageSource, setOwningClass, setPropertyName, skipBlankValues, skipNullValues, toString, validate
public static final String VALIDATION_DSL_NAME
public static final String DEFAULT_INVALID_MIN_SIZE_MESSAGE_CODE
public static final String DEFAULT_INVALID_MIN_SIZE_MESSAGE
public int getMinSize()
public void setParameter(@Nonnull Object constraintParameter)
Constraint
setParameter
in interface Constraint
setParameter
in class AbstractConstraint
constraintParameter
- The constraintParameter to set.public boolean supports(@Nonnull Class<?> type)
Constraint
type
- The type to supportprotected void processValidate(@Nonnull Object target, Object propertyValue, @Nonnull Errors errors)
processValidate
in class AbstractConstraint