Class PasswordsMatchValidator
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.module.web.validation.validators.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
-
-
Constructor Summary
Constructors Constructor Description PasswordsMatchValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(AccountPasswordForm constraint)booleanisValid(AccountPasswordForm passwordForm, javax.validation.ConstraintValidatorContext context)Performs the validation step to check if the two inputs are set and then that they equal
-
-
-
Method Detail
-
initialize
public void initialize(AccountPasswordForm constraint)
-
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:
isValidin interfacejavax.validation.ConstraintValidator<PasswordsMatch,AccountPasswordForm>- Parameters:
passwordForm- the password formcontext- (not used here)- Returns:
- whether or not the validation passed
-
-