mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
40 lines
858 B
PHP
40 lines
858 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Wallets\Standards\Validators;
|
|
|
|
use App\Classes\General\Abstracts\AbstractValidation;
|
|
|
|
class WalletTransactionValidation extends AbstractValidation
|
|
{
|
|
|
|
protected function data($object): array
|
|
{
|
|
return [
|
|
'wallet_id' => $object->getWalletId(),
|
|
'currency_id' => $object->getCurrency(),
|
|
'amount' => $object->getAmount(),
|
|
'trans_type'=>$object->getTransType()
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function rules(): array
|
|
{
|
|
return [
|
|
'wallet_id' => 'required',
|
|
'currency_id' => 'required',
|
|
'amount' => 'required',
|
|
'trans_type'=>'required'
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function messages(): array
|
|
{
|
|
return [];
|
|
}
|
|
} |