Only allow one * (#797)

This commit is contained in:
MartinOscar 2024-12-08 20:23:37 +01:00 committed by GitHub
parent 8358e410dc
commit 9716b1e64d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -545,6 +545,7 @@ class ListFiles extends ListRecords
->form([
TextInput::make('searchTerm')
->placeholder('Enter a search term, e.g. *.txt')
->regex('/^[^*]*\*?[^*]*$/')
->minLength(3),
])
->action(fn ($data) => redirect(SearchFiles::getUrl([