*/ public function rules(): array { return [ // 'username' => 'required', // 'password' => 'required', 'code' => 'required' ]; } /** * @return array */ public function messages(): array { return [ 'username.required' => '入参错误', 'password.required' => '入参错误', 'code.required' => '入参错误' ]; } }