25 lines
599 B
PHP
25 lines
599 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StoreSimulationRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/** @return array<string, list<mixed>> */
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'base' => ['required', 'numeric', 'min:0'],
|
|
'rate' => ['required', 'numeric', 'between:0,100'],
|
|
'reduction' => ['required', 'numeric', 'between:0,100'],
|
|
'organization_id' => ['nullable', 'uuid', 'exists:organizations,id'],
|
|
];
|
|
}
|
|
}
|