Example #1
0
 /**
  * Builds a category form validator
  *
  * @return RequestValidator
  */
 private function buildValidator(Category $category)
 {
     $validator = $this->getValidator("category", $this->request);
     $validator->addCheck("name", new IsNotEmptyCheck($this->translate("Category name should not be empty")));
     $category->getSpecification()->setValidation($validator);
     return $validator;
 }