protected function validate()
    {
        $errors = array();
        foreach ($this->requiredAttributes as $requiredAttribute) {
            if (!ArrayHelper::keyExists($this->data, $requiredAttribute)) {
                $errors[] = $requiredAttribute.' is missing or empty';
            }
        }

        if (count($errors) > 0) {
            throw new ValidationError(get_called_class().' object misses required fields', $errors);
        }

        return true;
    }