22 lines
634 B
PHP
22 lines
634 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Promotions;
|
|
|
|
use App\Http\Requests\ApiFormRequest;
|
|
use App\Models\PromotionReminderLog;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class SendReminderRequest extends ApiFormRequest
|
|
{
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'reminder_type' => ['nullable', 'string', Rule::in(PromotionReminderLog::ALLOWED_TYPES)],
|
|
'subject' => ['nullable', 'string', 'max:191'],
|
|
'message' => ['nullable', 'string', 'max:5000'],
|
|
'channels' => ['nullable', 'array'],
|
|
'channels.*' => ['string', Rule::in(['in_app', 'email', 'sms'])],
|
|
];
|
|
}
|
|
}
|