Skip to content

Commit 3bc0bcf

Browse files
committed
do not validate empty values
1 parent 16ec1c0 commit 3bc0bcf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Validator/Constraints/UserPasswordValidator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ public function validate($password, Constraint $constraint)
3939
throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\UserPassword');
4040
}
4141

42+
if (null === $password || '' === $password) {
43+
return;
44+
}
45+
4246
$user = $this->tokenStorage->getToken()->getUser();
4347

4448
if (!$user instanceof UserInterface) {

0 commit comments

Comments
 (0)