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
Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ CHANGELOG
4
4
6.2
5
5
---
6
6
7
+
* Rename option `Email::VALIDATION_MODE_HTML5` to `Email::VALIDATION_MODE_HTML5_FORCE_TLD` with migration path, to make `Email::VALIDATION_MODE_HTML5` consistent with browser validation
7
8
* Add method `getCause()` to `ConstraintViolationInterface`
8
9
* Add the `When` constraint and validator
9
10
* Deprecate the "loose" e-mail validation mode, use "html5" instead
if (self::VALIDATION_MODE_HTML5 === $mode && !$allowNoTld) {
79
+
trigger_deprecation(
80
+
'symfony/validator',
81
+
'6.2',
82
+
sprintf('To match browser validation, the "html5" mode will allow domains without tld. Use "%s" to keep disallowing those domains.', self::VALIDATION_MODE_HTML5_FORCE_TLD)
sprintf('$allowNoTld flag is only included temporarily, please remove it\'s usages during updates to 7.0.')
93
+
);
94
+
}
95
+
74
96
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);
97
+
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_FORCE_TLD);
76
98
}
77
99
78
100
if (self::VALIDATION_MODE_STRICT === $this->mode && !class_exists(StrictEmailValidator::class)) {
@@ -41,7 +43,7 @@ public function __construct(string $defaultMode = Email::VALIDATION_MODE_LOOSE)
41
43
}
42
44
43
45
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);
46
+
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_FORCE_TLD);
0 commit comments