alexander-torosh/yona-cms

Cannot save pages ?

adzanny opened this issue · 0 comments

I've made Little fix on Page.php

public function validation()
    {
     //add Validation init
      $validator = new Validation();

      $validator->add('slug', new UniquenessValidator(
          [
              "model"   => $this,
              "message" => $this->getDi()->get('helper')->translate("Page with slug is already exists")
          ]
      ));
      return $this->validate($validator);
    }