From 44e307c4f88274d33c2f1ef9e7dde07a2f37d427 Mon Sep 17 00:00:00 2001 From: RMartinOscar <40749467+RMartinOscar@users.noreply.github.com> Date: Sun, 8 Dec 2024 19:05:29 +0000 Subject: [PATCH] Only allow one * --- app/Filament/Server/Resources/FileResource/Pages/ListFiles.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php b/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php index 309e68754f..9769cd8c25 100644 --- a/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php +++ b/app/Filament/Server/Resources/FileResource/Pages/ListFiles.php @@ -545,6 +545,7 @@ protected function getHeaderActions(): array ->form([ TextInput::make('searchTerm') ->placeholder('Enter a search term, e.g. *.txt') + ->regex('/^[^*]*\*?[^*]*$/') ->minLength(3), ]) ->action(fn ($data) => redirect(SearchFiles::getUrl([