Enforce request validation style rules
linter / quality (pull_request) Successful in 2m28s
tests / ci (8.4) (pull_request) Successful in 1m22s

This commit is contained in:
2026-04-11 19:44:21 +02:00
parent 97b188e942
commit 73cee8178f
7 changed files with 101 additions and 72 deletions
+5 -2
View File
@@ -4,6 +4,7 @@ namespace App\Http\Requests;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Arr;
use Illuminate\Validation\Rule;
class StoreProjectRequest extends FormRequest
@@ -18,9 +19,11 @@ class StoreProjectRequest extends FormRequest
protected function prepareForValidation(): void
{
if ($this->has('key')) {
$key = Arr::get($this->all(), 'key');
if ($key !== null) {
$this->merge([
'key' => strtoupper((string) $this->string('key')->trim()),
'key' => strtoupper(trim((string) $key)),
]);
}
}