/** * Validate slug * * @param $value * @param array $context * @return boolean */ public function validateSlug($value, array $context = []) { return $this->model->isSlugFree($value, $this->newsId); }
/** * Validate a category name * * @param $value * @param array $context * @return boolean */ public function validateCategoryName($value, array $context = []) { return $this->model->isCategoryFree($value, $this->categoryId); }