public function checkValidity($data, $omitMandatoryCheck = false) { if (!$omitMandatoryCheck && $this->getMandatory() && $this->isEmpty($data)) { throw new Model\Element\ValidationException("Empty mandatory field [ " . $this->getName() . " ]"); } }