2023-09-06 17:24:53 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests\Api\V4;
|
|
|
|
|
|
|
|
|
|
class SingleOptinRequest extends BaseApiRequest
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
public function rules(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
2025-07-23 14:24:38 +02:00
|
|
|
'email' => 'required|email:rfc,dns,spoof,filter',
|
|
|
|
|
'opt_in' => 'required|boolean',
|
|
|
|
|
'answer_id' => 'sometimes|array|min:1',
|
|
|
|
|
'answer_id.*' => 'sometimes|integer|exists:answers,id',
|
2023-09-06 17:24:53 +02:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|