erp/app/Http/Requests/GroupsRequest.php

39 lines
877 B
PHP
Raw Permalink Normal View History

2022-10-21 13:09:30 +08:00
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class GroupsRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return false;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'title' => ['required', 'string'],
'datetimerange' => ['required', 'array'],
'is_save_preview' => ['required', 'integer'],
'group_id' => ['integer'],
'delete_ids' => ['array'],
'new_ids' => ['required_if:group_id,0','array'],
'change_data' => ['array'],
// 'sort' => ['array'],
2022-10-21 13:09:30 +08:00
];
}
}