Skip to content

Commit 5b2d0a8

Browse files
authored
Updated regex to capture a 2 character TLD
1 parent a09dc1e commit 5b2d0a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Validator/Domain.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function passes($attribute, $value): bool
2323
return true;
2424
}
2525

26-
return (bool) preg_match('/^(?:[a-z0-9](?:[a-z0-9-æøå]{0,61}[a-z0-9])?\.)+.[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$/isu', $value);
26+
return (bool) preg_match('/^(?:[a-z0-9](?:[a-z0-9-æøå]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$/isu', $value);
2727
}
2828

2929
/**

0 commit comments

Comments
 (0)