validate category.