summaryrefslogtreecommitdiffstats
path: root/Core/Validator
diff options
context:
space:
mode:
authorHugo Hamon <hugo.hamon@sensio.com>2013-02-02 14:28:44 +0100
committerHugo Hamon <hugo.hamon@sensio.com>2013-02-02 14:28:44 +0100
commite642286ad42e113e0ed8e3343ad852121d2f467a (patch)
treedfa0a4e3a051f74624c4c29a6c716bbe52c9f697 /Core/Validator
parent247a2f93a49d7a96f3f59740120df40db898309a (diff)
downloadsymfony-security-e642286ad42e113e0ed8e3343ad852121d2f467a.zip
symfony-security-e642286ad42e113e0ed8e3343ad852121d2f467a.tar.gz
symfony-security-e642286ad42e113e0ed8e3343ad852121d2f467a.tar.bz2
[Security] [Tests] added unit tests for the UserPasswordValidator class and made the validator service for the UserPassword constraint configurable.
Diffstat (limited to 'Core/Validator')
-rw-r--r--Core/Validator/Constraint/UserPassword.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/Core/Validator/Constraint/UserPassword.php b/Core/Validator/Constraint/UserPassword.php
index 3279e02..e90d9af 100644
--- a/Core/Validator/Constraint/UserPassword.php
+++ b/Core/Validator/Constraint/UserPassword.php
@@ -19,9 +19,10 @@ use Symfony\Component\Validator\Constraint;
class UserPassword extends Constraint
{
public $message = 'This value should be the user current password.';
+ public $service = 'security.validator.user_password';
public function validatedBy()
{
- return 'security.validator.user_password';
+ return $this->service;
}
}