Min/Max Validators ignore empty string

Fixes #3686
This commit is contained in:
Christopher Hall 2012-05-02 16:28:47 -07:00
parent e9f5f130e8
commit f30bf36d85
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ class MaxValidator extends ConstraintValidator
*/
public function validate($value, Constraint $constraint)
{
if (null === $value) {
if (null === $value || '' === $value) {
return;
}

View File

@ -31,7 +31,7 @@ class MinValidator extends ConstraintValidator
*/
public function validate($value, Constraint $constraint)
{
if (null === $value) {
if (null === $value || '' === $value) {
return;
}