[web-downloads] main: Fix validation rules

From: Date: Fri, 26 Sep 2025 15:24:46 +0000
Subject: [web-downloads] main: Fix validation rules
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-33235@lists.php.net to get a copy of this message
Author: Shivam Mathur (shivammathur) Date: 2025-09-26T20:54:35+05:30 Commit: https://github.com/php/web-downloads/commit/1338eeb17d371035201a46f6827b5e03f9928873 Raw diff: https://github.com/php/web-downloads/commit/1338eeb17d371035201a46f6827b5e03f9928873.diff Fix validation rules Changed paths: M src/Http/Controllers/SeriesDeleteController.php M src/Http/Controllers/SeriesInitController.php M src/Http/Controllers/SeriesStabilityController.php Diff: diff --git a/src/Http/Controllers/SeriesDeleteController.php b/src/Http/Controllers/SeriesDeleteController.php index b5869eb..d43d1bf 100644 --- a/src/Http/Controllers/SeriesDeleteController.php +++ b/src/Http/Controllers/SeriesDeleteController.php @@ -10,7 +10,7 @@ class SeriesDeleteController extends BaseController protected function validate(array $data): bool { $validator = new Validator([ - 'php_version' => 'required|string:regex:/^(\d+\.\d+|master)$/', + 'php_version' => 'required|string|regex:/^(\d+\.\d+|master)$/', 'vs_version' => 'required|string|regex:/^v[c|s]\d{2}$/', ]); diff --git a/src/Http/Controllers/SeriesInitController.php b/src/Http/Controllers/SeriesInitController.php index 728cca5..7cf213e 100644 --- a/src/Http/Controllers/SeriesInitController.php +++ b/src/Http/Controllers/SeriesInitController.php @@ -10,7 +10,7 @@ class SeriesInitController extends BaseController protected function validate(array $data): bool { $validator = new Validator([ - 'php_version' => 'required|string:regex:/^\d+\.\d+$/', + 'php_version' => 'required|string|regex:/^\d+\.\d+$/', 'source_vs' => 'required|string|regex:/^v[c|s]\d{2}$/', 'target_vs' => 'required|string|regex:/^v[c|s]\d{2}$/', ]); diff --git a/src/Http/Controllers/SeriesStabilityController.php b/src/Http/Controllers/SeriesStabilityController.php index ee7a40a..cdaa1b6 100644 --- a/src/Http/Controllers/SeriesStabilityController.php +++ b/src/Http/Controllers/SeriesStabilityController.php @@ -10,7 +10,7 @@ class SeriesStabilityController extends BaseController protected function validate(array $data): bool { $validator = new Validator([ - 'php_version' => 'required|string:regex:/^(\d+\.\d+|master)$/', + 'php_version' => 'required|string|regex:/^(\d+\.\d+|master)$/', 'vs_version' => 'required|string|regex:/^v[c|s]\d{2}$/', ]);

« previous php.webmaster (#33235) next »