jodd.vtor.constraint
Class EqualToFieldConstraint
java.lang.Object
jodd.vtor.constraint.EqualToFieldConstraint
- All Implemented Interfaces:
- ValidationConstraint<EqualToField>
public class EqualToFieldConstraint
- extends Object
- implements ValidationConstraint<EqualToField>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fieldName
protected String fieldName
EqualToFieldConstraint
public EqualToFieldConstraint()
EqualToFieldConstraint
public EqualToFieldConstraint(String fieldName)
getFieldName
public String getFieldName()
setFieldName
public void setFieldName(String fieldName)
configure
public void configure(EqualToField annotation)
- Description copied from interface:
ValidationConstraint
- Configures constraint from associated annotation.
- Specified by:
configure in interface ValidationConstraint<EqualToField>
isValid
public boolean isValid(ValidationConstraintContext vcc,
Object value)
- Description copied from interface:
ValidationConstraint
- Performs validation in context of target object on provided value.
- Specified by:
isValid in interface ValidationConstraint<EqualToField>
- Returns:
true if validation passes, otherwise false.
validate
public static boolean validate(Object target,
Object value,
String fieldName)