/** * Validates the input. */ protected function validate() { $c = count($this->data); if ($c === 0) { throw new BCGParseException('code39extended', 'No data has been entered.'); } parent::validate(); }