public class BlankConstraint extends AbstractVetoingConstraint
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_BLANK_MESSAGE |
static String |
DEFAULT_BLANK_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 |
---|
BlankConstraint() |
Modifier and Type | Method and Description |
---|---|
String |
getName() |
Object |
getParameter() |
boolean |
isBlank() |
protected boolean |
processValidateWithVetoing(Object target,
Object propertyValue,
Errors errors) |
void |
setParameter(Object constraintParameter)
The parameter which the constraint is validated against.
|
protected boolean |
skipBlankValues() |
boolean |
supports(Class<?> type)
Returns whether the constraint supports being applied against the specified type;
|
processValidate, validateWithVetoing
checkState, getDefaultMessage, getPropertyName, isValid, rejectValue, rejectValue, rejectValue, rejectValue, rejectValue, rejectValueWithDefaultMessage, setMessageSource, setOwningClass, setPropertyName, skipNullValues, toString, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPropertyName, isValid, setMessageSource, setOwningClass, setPropertyName, validate
public static final String VALIDATION_DSL_NAME
public static final String DEFAULT_BLANK_MESSAGE_CODE
public static final String DEFAULT_BLANK_MESSAGE
public boolean supports(@Nonnull Class<?> type)
Constraint
type
- The type to support@Nonnull public Object getParameter()
getParameter
in interface Constraint
getParameter
in class AbstractConstraint
public boolean isBlank()
public void setParameter(@Nonnull Object constraintParameter)
Constraint
setParameter
in interface Constraint
setParameter
in class AbstractConstraint
constraintParameter
- The constraintParameter to set.protected boolean skipBlankValues()
skipBlankValues
in class AbstractConstraint
protected boolean processValidateWithVetoing(@Nonnull Object target, @Nullable Object propertyValue, @Nonnull Errors errors)
processValidateWithVetoing
in class AbstractVetoingConstraint