protected function checkFormConfig()
{
if (!$this->hasModel() && empty($this->formName)) {
throw new InvalidConfigException("Either the 'formName' has to be set or a valid 'model' property must be set extending from '\\yii\\base\\Model'.");
}
if (empty($this->formName) && (empty($this->form) || !$this->form instanceof ActiveForm)) {
throw new InvalidConfigException("The 'form' property must be set and must be an instance of '\\kartik\\form\\ActiveForm'.");
}
}