[Validator] Pass strict argument into the strict email validator
This commit is contained in:
parent
f1611ab8fc
commit
d2a634d73d
|
@ -126,7 +126,7 @@ Validator
|
|||
Also you have to add to your composer.json:
|
||||
|
||||
```
|
||||
"egulias/email-validator": "1.1.*"
|
||||
"egulias/email-validator": "~1.2"
|
||||
```
|
||||
|
||||
* `ClassMetadata::getGroupSequence()` now returns `GroupSequence` instances
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
"propel/propel1": "1.6.*",
|
||||
"ircmaxell/password-compat": "1.0.*",
|
||||
"ocramius/proxy-manager": ">=0.3.1,<0.6-dev",
|
||||
"egulias/email-validator": "1.1.0"
|
||||
"egulias/email-validator": "~1.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": { "Symfony\\": "src/" },
|
||||
|
|
|
@ -59,7 +59,7 @@ class EmailValidator extends ConstraintValidator
|
|||
|
||||
if ($constraint->strict && class_exists('\Egulias\EmailValidator\EmailValidator')) {
|
||||
$strictValidator = new StrictEmailValidator();
|
||||
$valid = $strictValidator->isValid($value, false);
|
||||
$valid = $strictValidator->isValid($value, false, true);
|
||||
} elseif ($constraint->strict === true) {
|
||||
throw new \RuntimeException('Strict email validation requires egulias/email-validator');
|
||||
} else {
|
||||
|
|
Reference in New Issue