generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 188
Closed
Description
Regression of #79
I have a Form Request with a date attribute with the date rule. It should be parsed as a string<date>, but it's parsed as a regular string.
The Form Request:
class StoreTimeLogRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, ValidationRule|array|string>
*/
public function rules(): array
{
$current = $this->route('time_log');
return [
'project_id' => ['required', 'integer', Rule::exists('user_tasks')->where(function (Builder $query) {
return $query->where('user_id', \Auth::id());
})],
'task_id' => ['required', 'integer', new ValidUserTask()],
'date' => 'required', 'date', 'after_or_equal:1 year ago', 'before_or_equal:now'],
'start_time' => ['required', new Time(), new UniqueTimeLogFrame($current)],
'stop_time' => ['required', new Time(), 'after:start_time', new UniqueTimeLogFrame($current)],
];
}
}The output:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
