mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 20:43:56 +00:00
42 lines
801 B
PHP
42 lines
801 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Remarks\Standards\Validators;
|
|
|
|
|
|
use App\Classes\General\Abstracts\AbstractValidation;
|
|
use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
|
|
|
|
class RemarkValidation extends AbstractValidation
|
|
{
|
|
|
|
|
|
/**
|
|
* @param RemarkObject $object
|
|
* @return array
|
|
*/
|
|
protected function data($object): array {
|
|
return [
|
|
'commenter_id' => $object->getCommenterId(),
|
|
'content' => $object->getContent(),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function rules(): array {
|
|
return [
|
|
'commenter_id' => 'required',
|
|
'content' => 'required',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function messages(): array {
|
|
return [];
|
|
}
|
|
|
|
}
|