mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 16:54:45 +02:00
Fix 500 when searching for empty term (#1340)
This commit is contained in:
parent
79691ba663
commit
c8230771ec
@ -515,8 +515,9 @@ class ListFiles extends ListRecords
|
|||||||
->form([
|
->form([
|
||||||
TextInput::make('searchTerm')
|
TextInput::make('searchTerm')
|
||||||
->placeholder('Enter a search term, e.g. *.txt')
|
->placeholder('Enter a search term, e.g. *.txt')
|
||||||
|
->required()
|
||||||
->regex('/^[^*]*\*?[^*]*$/')
|
->regex('/^[^*]*\*?[^*]*$/')
|
||||||
->minLength(3),
|
->minValue(3),
|
||||||
])
|
])
|
||||||
->action(fn ($data) => redirect(SearchFiles::getUrl([
|
->action(fn ($data) => redirect(SearchFiles::getUrl([
|
||||||
'searchTerm' => $data['searchTerm'],
|
'searchTerm' => $data['searchTerm'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user