Commit workspace changes
This commit is contained in:
36
app/Http/Requests/Groups/StoreGroupReleaseRequest.php
Normal file
36
app/Http/Requests/Groups/StoreGroupReleaseRequest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Requests\Groups;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreGroupReleaseRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->user() !== null;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'title' => ['required', 'string', 'min:2', 'max:180'],
|
||||
'summary' => ['nullable', 'string', 'max:320'],
|
||||
'description' => ['nullable', 'string', 'max:40000'],
|
||||
'cover_path' => ['nullable', 'string', 'max:2048'],
|
||||
'cover_file' => ['nullable', 'image', 'mimes:jpg,jpeg,png,webp', 'max:5120'],
|
||||
'status' => ['nullable', 'in:' . implode(',', (array) config('groups.releases.statuses', []))],
|
||||
'current_stage' => ['nullable', 'in:' . implode(',', (array) config('groups.releases.stages', []))],
|
||||
'visibility' => ['nullable', 'in:' . implode(',', (array) config('groups.releases.visibility_options', []))],
|
||||
'planned_release_at' => ['nullable', 'date'],
|
||||
'lead_user_id' => ['nullable', 'integer'],
|
||||
'linked_project_id' => ['nullable', 'integer'],
|
||||
'linked_collection_id' => ['nullable', 'integer'],
|
||||
'featured_artwork_id' => ['nullable', 'integer'],
|
||||
'release_notes' => ['nullable', 'string', 'max:40000'],
|
||||
'is_featured' => ['nullable', 'boolean'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user