ldc-mesbr-app/app/Http/Requests/Api/V1/Customer/StoreRequest.php
Vincent BRIDIER b7cb4c0ab4
Merge API
2023-11-24 20:26:29 +01:00

33 lines
824 B
PHP

<?php
namespace App\Http\Requests\Api\V1\Customer;
use Illuminate\Foundation\Http\FormRequest;
class StoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
*/
public function rules(): array
{
return [
'hashcode' => "required|uuid|unique:customers,hashcode",
'email' => "required|email"
// FIXME : Voir si on met autre chose ici pour email
// FIXME : Ajouter le check pour la clé unique hashcode + email.
];
}
}