Skip to content

Commit

Permalink
Return after the first message
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Feb 27, 2025
1 parent 54f1f9b commit 2a2de78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Rules/Handle.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public function validate(string $attribute, mixed $value, Closure $fail): void
{
if (Str::startsWith($value, range(0, 9))) {
$fail('statamic::validation.handle_starts_with_number')->translate();

return;
}

if (! preg_match('/^[a-zA-Z][a-zA-Z0-9]*(?:_{0,1}[a-zA-Z0-9])*$/', $value)) {
Expand Down

0 comments on commit 2a2de78

Please sign in to comment.