Files
Laravel/mini-crm/app/Http/Requests/UpdateProductRequest.php
T
2026-10-07 16:34:12 +02:00

33 lines
723 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class UpdateProductRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
//
'name' => 'required|string|max:150',
'price' => 'required|integer|min:0',
'stock' => 'required|integer|min:0',
];
}
}