From 495bbe7b7e7249f26ec4e9d2f91e36995f5072e9 Mon Sep 17 00:00:00 2001 From: Benjamin Nussbaum Date: Fri, 5 Sep 2025 21:20:39 +0200 Subject: [PATCH 1/2] fix: validation --- resources/views/livewire/plugins/recipe.blade.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/views/livewire/plugins/recipe.blade.php b/resources/views/livewire/plugins/recipe.blade.php index bfa3028..86efec6 100644 --- a/resources/views/livewire/plugins/recipe.blade.php +++ b/resources/views/livewire/plugins/recipe.blade.php @@ -104,11 +104,11 @@ new class extends Component { 'markup_code' => 'nullable|string', 'markup_language' => 'nullable|string|in:blade,liquid', 'checked_devices' => 'array', - 'playlist_name' => 'required_if:selected_playlist,new|string|max:255', - 'selected_weekdays' => 'nullable|array', - 'active_from' => 'nullable|date_format:H:i', - 'active_until' => 'nullable|date_format:H:i', - 'selected_playlist' => 'nullable|string', + 'device_playlist_names' => 'array', + 'device_playlists' => 'array', + 'device_weekdays' => 'array', + 'device_active_from' => 'array', + 'device_active_until' => 'array', ]; public function editSettings() From 425dbf6b3fac9278c9fe1190e32d1c1fc8fc2d6f Mon Sep 17 00:00:00 2001 From: Benjamin Nussbaum Date: Fri, 5 Sep 2025 21:33:39 +0200 Subject: [PATCH 2/2] fix(#89): regex pattern too broad --- app/Models/Plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Plugin.php b/app/Models/Plugin.php index d0caf7b..40b3383 100644 --- a/app/Models/Plugin.php +++ b/app/Models/Plugin.php @@ -236,7 +236,7 @@ class Plugin extends Model // This handles: {% for item in collection | filter: "key", "value" %} // Converts to: {% assign temp_filtered = collection | filter: "key", "value" %}{% for item in temp_filtered %} $template = preg_replace_callback( - '/{%\s*for\s+(\w+)\s+in\s+([^|]+)\s*\|\s*([^}]+)%}/', + '/{%\s*for\s+(\w+)\s+in\s+([^|%}]+)\s*\|\s*([^%}]+)%}/', function ($matches) { $variableName = mb_trim($matches[1]); $collection = mb_trim($matches[2]);