onstraintAnnotation) { }

  @Override
  public boolean isValid(PasswordHolder value, ConstraintValidatorContext context) {
    boolean result;
    
    result = value.getPassword1().equals(value.getPassword2());

    return result;
  }

}
</code></pre>

            <p>Note that a <code>PasswordHolder</code> instance is
            passed to the <code>isValid()</code> method.  This method
            will only be called if the individual properties of
            the <code>PasswordHolder</code> are valid.  T