We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2569af1 commit 82537e5Copy full SHA for 82537e5
src/Validator/UrlValidator.php
@@ -14,7 +14,7 @@ public function message(string $message): self
14
15
public function validate(string $value): string
16
{
17
- if (!str_starts_with(strtolower($value), 'http')) {
+ if (!preg_match('/^https?:\/\//', strtolower($value))) {
18
return $this->message;
19
}
20
return !filter_var($value, FILTER_VALIDATE_URL) ? $this->message : '';
0 commit comments