24 lines
544 B
PHP
24 lines
544 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Api\V2;
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
class SingleOptinRequest extends BaseApiRequest
|
|
{
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'email' => 'required|email:rfc,dns,spoof,filter',
|
|
'opt_in' => 'required|boolean',
|
|
'answer_id' => 'sometimes|array|min:1',
|
|
'answer_id.*' => 'sometimes|integer|exists:answers,id',
|
|
];
|
|
}
|
|
}
|