protected function validateObject() { /** * @var $object \Payu\Component\Card */ $object = $this->request->getCard(); if (!$object || !$object instanceof Card) { throw new ValidationError('Card number does not be empty.'); } }