mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-10 01:02:15 +01:00
Stricter validation for uuid and integer
This commit is contained in:
committed by
Constantin Graf
parent
2b1da883fb
commit
69d3ff4f7b
@@ -30,10 +30,10 @@ class TaskUpdateRequest extends FormRequest
|
||||
'string',
|
||||
'min:1',
|
||||
'max:255',
|
||||
(new UniqueEloquent(Task::class, 'name', function (Builder $builder): Builder {
|
||||
UniqueEloquent::make(Task::class, 'name', function (Builder $builder): Builder {
|
||||
/** @var Builder<Task> $builder */
|
||||
return $builder->where('project_id', '=', $this->task->project_id);
|
||||
}))->ignore($this->task?->getKey())->withCustomTranslation('validation.task_name_already_exists'),
|
||||
})->ignore($this->task?->getKey())->withCustomTranslation('validation.task_name_already_exists'),
|
||||
],
|
||||
'is_done' => [
|
||||
'boolean',
|
||||
@@ -43,6 +43,7 @@ class TaskUpdateRequest extends FormRequest
|
||||
'nullable',
|
||||
'integer',
|
||||
'min:0',
|
||||
'max:2147483647',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user