30 lines
647 B
PHP
30 lines
647 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Requests\V1\Stock;
|
||
|
|
|
||
|
|
use Illuminate\Foundation\Http\FormRequest;
|
||
|
|
|
||
|
|
class StoreStockAdjustmentRequest extends FormRequest
|
||
|
|
{
|
||
|
|
public function authorize(): bool
|
||
|
|
{
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function rules(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'quantity' => ['required', 'numeric', 'not_in:0'],
|
||
|
|
'remark' => ['nullable', 'string', 'max:500'],
|
||
|
|
];
|
||
|
|
}
|
||
|
|
|
||
|
|
public function messages(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'quantity.required' => __('error.stock.adjustment_qty_required'),
|
||
|
|
'quantity.not_in' => __('error.stock.adjustment_qty_zero'),
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|