24 lines
446 B
PHP
24 lines
446 B
PHP
<?php
|
|
|
|
namespace App\Domains\Purchase\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdatePurchaseItemQuantityRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return $this->user() !== null;
|
|
}
|
|
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'quantity' => ['required', 'integer', 'min:1', 'max:100'],
|
|
];
|
|
}
|
|
}
|