Files
WMS/Modules/ChatGPT/Http/Requests/StoreChatGptApiSettingRequest.php
T

31 lines
679 B
PHP

<?php
namespace Modules\ChatGPT\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreChatGptApiSettingRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'name' => ['nullable', 'string', 'max:255'],
'api_key' => ['required', 'string', 'min:20', 'max:500'],
'is_active' => ['nullable', 'boolean'],
];
}
}