You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (self::VALIDATION_MODE_LOOSE === $this->mode) {
75
+
trigger_deprecation('symfony/validator', '6.2', 'The "%s" mode is deprecated. The default mode will be changed to "%s" in 7.0.', self::VALIDATION_MODE_LOOSE, self::VALIDATION_MODE_HTML5);
76
+
}
77
+
71
78
if (self::VALIDATION_MODE_STRICT === $this->mode && !class_exists(StrictEmailValidator::class)) {
72
79
thrownewLogicException(sprintf('The "egulias/email-validator" component is required to use the "%s" constraint in strict mode.', __CLASS__));
Copy file name to clipboardExpand all lines: Constraints/EmailValidator.php
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,10 @@ public function __construct(string $defaultMode = Email::VALIDATION_MODE_LOOSE)
40
40
thrownew \InvalidArgumentException('The "defaultMode" parameter value is not valid.');
41
41
}
42
42
43
+
if (Email::VALIDATION_MODE_LOOSE === $defaultMode) {
44
+
trigger_deprecation('symfony/validator', '6.2', 'The "%s" mode is deprecated. The default mode will be changed to "%s" in 7.0.', Email::VALIDATION_MODE_LOOSE, Email::VALIDATION_MODE_HTML5);
0 commit comments