}
@Override
public boolean isValid(final Object value, final ConstraintValidatorContext context) {
try {
MyBean myBean = (MyBean) value;
return myBean.getPassword() == null && myBean.getRepeatPassword() == null || myBean.getPassword() != null && myBean.getPassword().equals(myBean.getRepeatPassword());
} catch (final Exception ignore) {
// ignore
}
return true;
}