public class MaxSizeConstraint extends AbstractConstraint
Validates maximum size or length of the property, for strings and arrays this is the length and collections the size.
Modifiers | Name | Description |
---|---|---|
private int |
maxSize |
Fields inherited from class | Fields |
---|---|
class AbstractConstraint |
classShortName, constraintOwningClass, constraintParameter, constraintPropertyName, fullQualifiedConstraintErrorCode, fullQualifiedPrefix, messageSource, shortNameConstraintErrorCode, shortNamePrefix |
Constructor and description |
---|
MaxSizeConstraint
(java.lang.Class<?> constraintOwningClass, java.lang.String constraintPropertyName, java.lang.Object constraintParameter, org.springframework.context.MessageSource messageSource) |
Type Params | Return Type | Name and description |
---|---|---|
|
public int |
getMaxSize()
|
|
public java.lang.String |
getName() |
|
protected void |
processValidate(java.lang.Object target, java.lang.Object propertyValue, org.springframework.validation.Errors errors) |
|
public boolean |
supports(java.lang.Class type) |
|
protected java.lang.Object |
validateParameter(java.lang.Object constraintParameter) |
Methods inherited from class | Name |
---|---|
class AbstractConstraint |
checkState, getDefaultMessage, getParameter, getPropertyName, getPropertyValue, isValid, processValidate, rejectValue, rejectValue, rejectValue, rejectValue, rejectValue, rejectValueWithDefaultMessage, skipBlankValues, skipNullValues, toString, validate, validateParameter |