2023-08-28 19:08:23 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests\Api\Contacts;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
|
|
|
|
class DestroyContactsRequest extends FormRequest
|
|
|
|
|
{
|
2025-05-28 15:16:35 +02:00
|
|
|
/**
|
|
|
|
|
* Prepare the data for validation.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
protected function prepareForValidation(): void
|
|
|
|
|
{
|
|
|
|
|
$this->merge([
|
|
|
|
|
'contactUuidList' => \collect($this->contactUuidList)->filter()->all(),
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-28 19:08:23 +02:00
|
|
|
/**
|
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
2025-05-20 10:16:12 +02:00
|
|
|
public function rules(): array
|
2023-08-28 19:08:23 +02:00
|
|
|
{
|
|
|
|
|
return [
|
2025-05-20 10:16:12 +02:00
|
|
|
'contactUuidList' => 'present|array|min:0',
|
2023-08-29 14:02:39 +02:00
|
|
|
'contactUuidList.*' => 'uuid',
|
2023-08-28 19:08:23 +02:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|