ProjectHandleInviteRequest.php 863 Bytes
<?php


namespace App\Http\Container\AppSection\Requests;


use Hikoon\LaravelApi\Support\ApiRequest;

class ProjectHandleInviteRequest extends ApiRequest
{
    public function rules(): array
    {
        return [
            'user_id' => 'required|int',
            'project_id' => 'required|int',
            'status' => 'required|integer|between:1,2'
        ];
    }

    public function messages(): array
    {
        return [
            'user_id.required' => 'user_id为必填项。',
            'user_id.int' => 'user_id为整数类型',
            'project_id.required' => 'project_id为必填项。',
            'project_id.int' => 'project_id为整数类型',
            'status.required' => 'status为必填项。',
            'status.integer' => 'status为整数类型',
            'status.between' => 'status范围在1-2'
        ];
    }
}