mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
41 lines
797 B
PHP
41 lines
797 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\KeyValuePairs\Standards\Validators;
|
|
|
|
|
|
use App\Classes\General\Abstracts\AbstractValidation;
|
|
use App\Classes\Modules\KeyValuePairs\DataTransferObjects\UpdateChatGPTPromptDTO;
|
|
|
|
class CreateChatGPTPromptValidation extends AbstractValidation
|
|
{
|
|
/**
|
|
* @param UpdateChatGPTPromptDTO $object
|
|
* @return array
|
|
*/
|
|
protected function data($object): array
|
|
{
|
|
return [
|
|
'title' => $object->getTitle(),
|
|
'prompt' => $object->getPrompt(),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function rules(): array
|
|
{
|
|
return [
|
|
'prompt' => 'required',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function messages(): array
|
|
{
|
|
return [];
|
|
}
|
|
}
|