|
@@ -8,10 +8,8 @@ class TbrRequest extends FormRequest
|
|
|
{
|
|
{
|
|
|
public function rules(): array
|
|
public function rules(): array
|
|
|
{
|
|
{
|
|
|
- $tbrId = $this->route('id');
|
|
|
|
|
-
|
|
|
|
|
return [
|
|
return [
|
|
|
- 'year' => ['required', 'integer', 'min:2000', 'max:2100', "unique:tbrs,year,{$tbrId}"],
|
|
|
|
|
|
|
+ 'year' => ['required', 'integer', 'min:2000', 'max:2100'],
|
|
|
'tbr_value' => ['required', 'numeric', 'min:0'],
|
|
'tbr_value' => ['required', 'numeric', 'min:0'],
|
|
|
'royalties_percentage' => ['required', 'numeric', 'min:0', 'max:1'],
|
|
'royalties_percentage' => ['required', 'numeric', 'min:0', 'max:1'],
|
|
|
'fnm_percentage' => ['required', 'numeric', 'min:0', 'max:1'],
|
|
'fnm_percentage' => ['required', 'numeric', 'min:0', 'max:1'],
|