36 lines
1.4 KiB
PHP
36 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\Collections;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class CollectionProgrammingMetadataRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return $this->user() !== null;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'collection_id' => ['required', 'integer', 'exists:collections,id'],
|
|
'experiment_key' => ['nullable', 'string', 'max:80'],
|
|
'experiment_treatment' => ['nullable', 'string', 'max:80'],
|
|
'placement_variant' => ['nullable', 'string', 'max:80'],
|
|
'ranking_mode_variant' => ['nullable', 'string', 'max:80'],
|
|
'collection_pool_version' => ['nullable', 'string', 'max:80'],
|
|
'test_label' => ['nullable', 'string', 'max:120'],
|
|
'placement_eligibility' => ['nullable', 'boolean'],
|
|
'promotion_tier' => ['nullable', 'string', 'max:40'],
|
|
'partner_key' => ['nullable', 'string', 'max:80'],
|
|
'trust_tier' => ['nullable', 'string', 'max:40'],
|
|
'sponsorship_state' => ['nullable', 'string', 'max:40'],
|
|
'ownership_domain' => ['nullable', 'string', 'max:80'],
|
|
'commercial_review_state' => ['nullable', 'string', 'max:40'],
|
|
'legal_review_state' => ['nullable', 'string', 'max:40'],
|
|
];
|
|
}
|
|
} |