show slug in form
CI/CD / test_and_check_app (push) Failing after 55s
CI/CD / Publish immutable image (push) Skipped

This commit is contained in:
2026-09-19 02:06:54 +02:00
parent b79d93fede
commit f9958fb7cf
9 changed files with 172 additions and 60 deletions
+11 -1
View File
@@ -17,11 +17,21 @@ class UpdateTeamRequest extends FormRequest
{
return [
'name' => ['nullable', 'string', 'max:255'],
'slug' => ['nullable', 'required_if:name', 'string', 'max:255', 'unique:teams,slug,'.$this->route('team')->id],
'slug' => ['nullable', 'required_with:name', 'string', 'max:255', 'unique:teams,slug,'.$this->route('team')->id],
'require_2fa' => ['required', 'boolean'],
];
}
public function messages(): array
{
return [
'slug.string' => '',
'slug.required' => '',
'slug.max' => '',
'slug.unique' => 'The name has already been taken.',
];
}
protected function prepareForValidation(): void
{
$this->merge([