Esempio n. 1
0
 public function inCategories($attribute, $params)
 {
     $categorys = Category::getIds();
     foreach ($this->categorys as $category) {
         if (!in_array($category, $categorys)) {
             $this->addError($attribute, "You add unknow category");
         }
     }
 }