/** * @inheritdoc */ public function rules() { return [[['fromAccountId', 'toTargetId', 'fromAmount', 'toAmount'], 'required'], [['fromAccountId', 'toTargetId'], 'integer'], [['fromAmount', 'toAmount'], 'string', 'max' => 255], ['fromAmount', CalcValidator::className(), 'resultAttribute' => 'fromTotal'], ['toAmount', CalcValidator::className(), 'resultAttribute' => 'toTotal']]; }
/** * @inheritdoc */ public function rules() { return ArrayHelper::merge(parent::rules(), [['amount', CalcValidator::className(), 'resultAttribute' => 'total']]); }