class FieldComparisonValidator implements ConstraintValidator<FieldComparison, Object> {

    @Override
    public boolean isValid(Object value, ConstraintValidatorContext context) {
        boolean valid = isValid(value);

        if (!valid) {
            addConstraintViolationMessageToField(context, message, firstFieldName);
        }

        return valid;
    }

}