File: /home/xedaptot/ai.naniguide.com/app/Http/Requests/Refactor/Ads/StoreAdAutomationRequest.php
<?php
namespace App\Http\Requests\Refactor\Ads;
use App\Model\AdAutomationRule;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class StoreAdAutomationRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255'],
'trigger_event' => ['required', Rule::in(AdAutomationRule::TRIGGERS)],
'action_type' => ['required', Rule::in(AdAutomationRule::ACTIONS)],
'target_id' => ['nullable', 'integer'],
];
}
}