Files
dockergprompt/app/Http/Requests/PromptProject/UpdatePromptProjectRequest.php
2026-09-01 09:22:30 -03:00

50 lines
1.8 KiB
PHP
Executable File

<?php
declare(strict_types=1);
namespace App\Http\Requests\PromptProject;
use Illuminate\Foundation\Http\FormRequest;
class UpdatePromptProjectRequest 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, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'title' => ['sometimes', 'string', 'max:255'],
'company_name' => ['nullable', 'string', 'max:255'],
'company_address' => ['nullable', 'string'],
'company_whatsapp' => ['nullable', 'string', 'max:255'],
'company_website' => ['nullable', 'url', 'max:255'],
'company_social_media' => ['nullable', 'string'],
'company_business_activities' => ['nullable', 'string'],
'company_services_products' => ['nullable', 'string'],
'objective' => ['sometimes', 'string'],
'context' => ['nullable', 'string'],
'persona' => ['nullable', 'string', 'max:255'],
'tone' => ['nullable', 'string', 'max:255'],
'constraints' => ['nullable', 'string'],
'output_format' => ['nullable', 'string'],
'examples' => ['nullable', 'string'],
'variables' => ['nullable', 'string'],
'temperature' => ['nullable', 'numeric', 'min:0', 'max:1'],
'max_tokens' => ['nullable', 'integer', 'min:1'],
'provider_id' => ['nullable', 'exists:ai_providers,id'],
'model_id' => ['nullable', 'exists:ai_models,id'],
];
}
}