public class EqualToFieldConstraint extends java.lang.Object implements ValidationConstraint<EqualToField>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
fieldName |
Constructor and Description |
---|
EqualToFieldConstraint() |
EqualToFieldConstraint(java.lang.String fieldName) |
Modifier and Type | Method and Description |
---|---|
void |
configure(EqualToField annotation)
Configures constraint from associated annotation.
|
java.lang.String |
getFieldName() |
boolean |
isValid(ValidationConstraintContext vcc,
java.lang.Object value)
Performs validation in context of target object on provided value.
|
void |
setFieldName(java.lang.String fieldName) |
static boolean |
validate(java.lang.Object target,
java.lang.Object value,
java.lang.String fieldName) |
public EqualToFieldConstraint()
public EqualToFieldConstraint(java.lang.String fieldName)
public java.lang.String getFieldName()
public void setFieldName(java.lang.String fieldName)
public void configure(EqualToField annotation)
ValidationConstraint
configure
in interface ValidationConstraint<EqualToField>
public boolean isValid(ValidationConstraintContext vcc, java.lang.Object value)
ValidationConstraint
isValid
in interface ValidationConstraint<EqualToField>
true
if validation passes, otherwise false
.public static boolean validate(java.lang.Object target, java.lang.Object value, java.lang.String fieldName)
Copyright © 2003-present Jodd Team