ldc-com-app-bo/app/Http/Requests/Api/Contacts/DestroyContactsRequest.php

34 lines
694 B
PHP
Raw Permalink Normal View History

<?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(),
]);
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(): array
{
return [
'contactUuidList' => 'present|array|min:0',
2023-08-29 14:02:39 +02:00
'contactUuidList.*' => 'uuid',
];
}
}