UserAuthCreateRequest.php 1.15 KB
<?php


namespace App\Http\Container\AppSection\Requests;


use Hikoon\LaravelApi\Support\ApiRequest;

class UserAuthCreateRequest extends ApiRequest
{

    public function rules(): array
    {
        return [
            'nick_name'  => 'required|string',
            'platform'   => 'required|array',
            'works'      => 'required|string',
            'img'        => 'array',
            'tags'       => 'required|array',
            'audio_info' => 'array',


        ];
    }

    public function messages(): array
    {
        return [
            'nick_name.required' => 'nick_name为必填项。',
            'nick_name.string'   => 'nick_name字符串类型',
            'platform.required'  => 'platform为必填项。',
            'platform.array'     => 'platform数组类型',
            'works.required'     => 'works为必填项。',
            'works.string'       => 'works字符串类型',
            'img.array'          => 'img数组类型',
            'tags.required'      => 'tags为必填项。',
            'tags.array'         => 'tags数组类型',
            'audio_info.array'   => 'audio_info为数组类型',
        ];
    }
}