Class PasswordsMatchValidator

  • All Implemented Interfaces:
    javax.validation.ConstraintValidator<PasswordsMatch,​AccountPasswordForm>

    public class PasswordsMatchValidator
    extends java.lang.Object
    implements javax.validation.ConstraintValidator<PasswordsMatch,​AccountPasswordForm>
    Form validator that checks if the new password and confirm password fields match
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void initialize​(AccountPasswordForm constraint)  
      boolean isValid​(AccountPasswordForm passwordForm, javax.validation.ConstraintValidatorContext context)
      Performs the validation step to check if the two inputs are set and then that they equal
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.validation.ConstraintValidator

        initialize
    • Constructor Detail

      • PasswordsMatchValidator

        public PasswordsMatchValidator()
    • Method Detail

      • isValid

        public boolean isValid​(AccountPasswordForm passwordForm,
                               javax.validation.ConstraintValidatorContext context)
        Performs the validation step to check if the two inputs are set and then that they equal
        Specified by:
        isValid in interface javax.validation.ConstraintValidator<PasswordsMatch,​AccountPasswordForm>
        Parameters:
        passwordForm - the password form
        context - (not used here)
        Returns:
        whether or not the validation passed