public class EqualToDeclaredFieldConstraint extends java.lang.Object implements ValidationConstraint<EqualToDeclaredField>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
fieldName |
Constructor and Description |
---|
EqualToDeclaredFieldConstraint() |
EqualToDeclaredFieldConstraint(java.lang.String fieldName) |
Modifier and Type | Method and Description |
---|---|
void |
configure(EqualToDeclaredField 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 EqualToDeclaredFieldConstraint()
public EqualToDeclaredFieldConstraint(java.lang.String fieldName)
public java.lang.String getFieldName()
public void setFieldName(java.lang.String fieldName)
public void configure(EqualToDeclaredField annotation)
ValidationConstraint
configure
in interface ValidationConstraint<EqualToDeclaredField>
public boolean isValid(ValidationConstraintContext vcc, java.lang.Object value)
ValidationConstraint
isValid
in interface ValidationConstraint<EqualToDeclaredField>
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