Merge pull request #15711 from RoyHridoy/fix/panel-creation-validation

Add Input Validation When Creating Panel
This commit is contained in:
Dan Harrin
2025-02-25 11:37:32 +00:00
committed by GitHub
@@ -20,6 +20,10 @@ trait CanGeneratePanels
placeholder: $placeholder,
default: $default,
required: true,
validate: fn (string $value) => match (true) {
preg_match('/^[a-zA-Z].*/', $value) => null,
default => 'The ID must start with a letter, and not a number or special character.',
},
));
$class = (string) str($id)