ldc-com-app-bo/app/Http/Requests/Api/Contacts/DestroyContactsRequest.php
2025-05-20 11:45:42 +02:00

33 lines
693 B
PHP

<?php
namespace App\Http\Requests\Api\Contacts;
use Illuminate\Foundation\Http\FormRequest;
class DestroyContactsRequest extends FormRequest
{
/**
* Prepare the data for validation.
*
* @return void
*/
protected function prepareForValidation(): void
{
$this->merge([
'contactUuidList' => \collect($this->contactUuidList)->filter()->all()
]);
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(): array
{
return [
'contactUuidList' => 'present|array|min:0',
'contactUuidList.*' => 'uuid',
];
}
}