Skip to content

Commit

Permalink
minor #54624 [Validator] Update the "no TLD" error message (nicolas-g…
Browse files Browse the repository at this point in the history
…rekas)

This PR was merged into the 7.1 branch.

Discussion
----------

[Validator] Update the "no TLD" error message

| Q             | A
| ------------- | ---
| Branch?       | 7.1
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

Could this message be easier to understand?

```diff
-    public string $tldMessage = 'This URL does not contain a TLD.';
+    public string $tldMessage = 'This URL is missing a top-level domain.';
```

/cc `@javiereguiluz`

Commits
-------

b1ba058 [Validator] Update the "no TLD" error message
  • Loading branch information
nicolas-grekas committed Apr 17, 2024
2 parents 8bb3b19 + b1ba058 commit 5ae5791
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Validator/Constraints/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Url extends Constraint
];

public string $message = 'This value is not a valid URL.';
public string $tldMessage = 'This URL does not contain a TLD.';
public string $tldMessage = 'This URL is missing a top-level domain.';
public array $protocols = ['http', 'https'];
public bool $relativeProtocol = false;
public bool $requireTld = false;
Expand Down

0 comments on commit 5ae5791

Please sign in to comment.