mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
40 lines
806 B
PHP
40 lines
806 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Currencies\Standards\Validators;
|
|
|
|
use App\Classes\General\Abstracts\AbstractValidation;
|
|
use App\Classes\Modules\Currencies\DataTransferObjects\CurrencyObject;
|
|
|
|
class CurrencyValidation extends AbstractValidation
|
|
{
|
|
/**
|
|
* @param CurrencyObject $object
|
|
* @return array
|
|
*/
|
|
protected function data($object): array
|
|
{
|
|
return [
|
|
'name' => $object->getName(),
|
|
'short_code' => $object->getShortCode()
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function rules(): array
|
|
{
|
|
return [
|
|
'name' => 'required',
|
|
'short_code' => 'required'
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function messages(): array
|
|
{
|
|
return [];
|
|
}
|
|
} |