8000 [Validator] add tldMessage in URL constructor · symfony/symfony@8db4a92 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8db4a92

Browse files
syjustfabpot
authored andcommitted
[Validator] add tldMessage in URL constructor
according to the following documentation https://symfony.com/doc/current/reference/constraints/Url.html#tldmessage
1 parent 1a09bff commit 8db4a92

File tree

1 file changed

+2
-0
lines changed
  • src/Symfony/Component/Validator/Constraints

1 file changed

+2
-0
lines changed

src/Symfony/Component/Validator/Constraints/Url.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public function __construct(
5454
?array $groups = null,
5555
mixed $payload = null,
5656
?bool $requireTld = null,
57+
?string $tldMessage = null,
5758
) {
5859
parent::__construct($options, $groups, $payload);
5960

@@ -66,6 +67,7 @@ public function __construct(
6667
$this->relativeProtocol = $relativeProtocol ?? $this->relativeProtocol;
6768
$this->normalizer = $normalizer ?? $this->normalizer;
6869
$this->requireTld = $requireTld ?? $this->requireTld;
70+
$this->tldMessage = $tldMessage ?? $this->tldMessage;
6971

7072
if (null !== $this->normalizer && !\is_callable($this->normalizer)) {
7173
throw new InvalidArgumentException(sprintf('The "normalizer" option must be a valid callable ("%s" given).', get_debug_type($this->normalizer)));

0 commit comments

Comments
 (0)
0