mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-21 05:24:09 +00:00
43 lines
819 B
PHP
43 lines
819 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Schedules\Standards\Validators;
|
|
|
|
|
|
use App\Classes\General\Abstracts\AbstractValidation;
|
|
use App\Classes\Modules\Schedules\DataTransferObjects\ScheduleObject;
|
|
|
|
class ScheduleValidation extends AbstractValidation
|
|
{
|
|
|
|
|
|
/**
|
|
* @param ScheduleObject $object
|
|
* @return array
|
|
*/
|
|
protected function data($object): array {
|
|
return [
|
|
'etd' => $object->getETD(),
|
|
'eta' => $object->getETA(),
|
|
'status' => $object->getStatus(),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function rules(): array {
|
|
return [
|
|
'etd' => 'required',
|
|
'eta' => 'required',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function messages(): array {
|
|
return [];
|
|
}
|
|
|
|
}
|