{"id":146,"date":"2016-05-05T12:23:39","date_gmt":"2016-05-05T11:23:39","guid":{"rendered":"https:\/\/www.threesl.com:2958\/blog\/?p=146"},"modified":"2019-12-02T08:46:57","modified_gmt":"2019-12-02T08:46:57","slug":"category-validation","status":"publish","type":"post","link":"https:\/\/www.threesl.com\/blog\/category-validation\/","title":{"rendered":"Category Validation"},"content":{"rendered":"<h2>Need to restrict what a user can set in a category?<\/h2>\n<p>All categories are set up in the <em>Project Schema<\/em>. Adding a v<em>erification test<\/em> can be used to ensure only sensible values are added. The types of test that can be set are controlled by the type of data being represented in the category. For example, a date can be tested to be within range, a text category may have a <em>Regex<\/em> test.<\/p>\n<figure id=\"attachment_147\" aria-describedby=\"caption-attachment-147\" style=\"width: 637px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-147 size-full\" src=\"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/02\/Image1-1.png\" alt=\"Setup of Category Validation Test\" width=\"637\" height=\"462\" srcset=\"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/02\/Image1-1.png 637w, https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/02\/Image1-1-300x218.png 300w\" sizes=\"auto, (max-width: 637px) 100vw, 637px\" \/><figcaption id=\"caption-attachment-147\" class=\"wp-caption-text\">Category Validation<\/figcaption><\/figure>\n<p>For more information on <em>categories<\/em> in Cradle, take a look at <a href=\"https:\/\/www.threesl.com\/cradle\/help\/7.4\/ProjectSetup\/Other\/prj_setup_itemdefs_categories.htm\">this useful Cradle help article.<\/a><\/p>\n<h5>Article updated 17\/09\/2018 &#8211; Added link to Cradle online help<\/h5>\n<aside class=\"mashsb-container mashsb-main mashsb-stretched\"><div class=\"mashsb-box\"><div class=\"mashsb-buttons\"><a class=\"mashicon-twitter mash-small mash-center mashsb-noshadow\" href=\"https:\/\/twitter.com\/intent\/tweet?text=&amp;url=https:\/\/www.threesl.com\/blog\/category-validation\/&amp;via=threesl\" target=\"_top\" rel=\"nofollow\"><span class=\"icon\"><\/span><span class=\"text\">Tweet<\/span><\/a><a class=\"mashicon-facebook mash-small mash-center mashsb-noshadow\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.threesl.com%2Fblog%2Fcategory-validation%2F\" target=\"_top\" rel=\"nofollow\"><span class=\"icon\"><\/span><span class=\"text\">Share<\/span><\/a><a class=\"mashicon-subscribe mash-small mash-center mashsb-noshadow\" href=\"#\" target=\"_top\" rel=\"nofollow\"><span class=\"icon\"><\/span><span class=\"text\">Newsletter<\/span><\/a><div class=\"onoffswitch2 mash-small mashsb-noshadow\" style=\"display:none\"><\/div><\/div>\n            <\/div>\n                <div style=\"clear:both\"><\/div><\/aside>\n            <!-- Share buttons by mashshare.net - Version: 4.0.47-->","protected":false},"excerpt":{"rendered":"<p>Need to restrict what a user can set in a category? All categories are set up in the Project Schema. Adding a verification test can be used to ensure only sensible values are added. The types of test that can be set are controlled by the type of data being represented in the category. For &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.threesl.com\/blog\/category-validation\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Category Validation&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[6],"tags":[51,596,597],"class_list":["post-146","post","type-post","status-publish","format-standard","hentry","category-tips","tag-categories","tag-testing","tag-validation-verification"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Category Validation - 3SL Blog<\/title>\n<meta name=\"description\" content=\"Category verification test to ensure categories contain sensible data\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.threesl.com\/blog\/category-validation\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Category Validation - 3SL Blog\" \/>\n<meta property=\"og:description\" content=\"Category verification test to ensure categories contain sensible data\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.threesl.com\/blog\/category-validation\/\" \/>\n<meta property=\"og:site_name\" content=\"3SL Blog\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/3SLCradle\" \/>\n<meta property=\"article:published_time\" content=\"2016-05-05T11:23:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-12-02T08:46:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/02\/Image1-1.png\" \/>\n<meta name=\"author\" content=\"3SL\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@threesl\" \/>\n<meta name=\"twitter:site\" content=\"@threesl\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"3SL\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/category-validation\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/category-validation\\\/\"},\"author\":{\"name\":\"3SL\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#\\\/schema\\\/person\\\/749ccd9b2d74303fa8927e06c2af8b0b\"},\"headline\":\"Category Validation\",\"datePublished\":\"2016-05-05T11:23:39+00:00\",\"dateModified\":\"2019-12-02T08:46:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/category-validation\\\/\"},\"wordCount\":109,\"publisher\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/category-validation\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/Image1-1.png\",\"keywords\":[\"categories\",\"testing\",\"validation &amp; verification\"],\"articleSection\":[\"Hints &amp; Tips\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/category-validation\\\/\",\"url\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/category-validation\\\/\",\"name\":\"Category Validation - 3SL Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/category-validation\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/category-validation\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/Image1-1.png\",\"datePublished\":\"2016-05-05T11:23:39+00:00\",\"dateModified\":\"2019-12-02T08:46:57+00:00\",\"description\":\"Category verification test to ensure categories contain sensible data\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/category-validation\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.threesl.com\\\/blog\\\/category-validation\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/category-validation\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/Image1-1.png\",\"contentUrl\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/Image1-1.png\",\"width\":637,\"height\":462,\"caption\":\"Category Validation\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/category-validation\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Category Validation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/\",\"name\":\"3SL Blog\",\"description\":\"From concept to creation\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#organization\",\"name\":\"3SL\",\"url\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/3SL_Logo_Medium.png\",\"contentUrl\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/02\\\/3SL_Logo_Medium.png\",\"width\":152,\"height\":80,\"caption\":\"3SL\"},\"image\":{\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"http:\\\/\\\/facebook.com\\\/3SLCradle\",\"https:\\\/\\\/x.com\\\/threesl\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.threesl.com\\\/blog\\\/#\\\/schema\\\/person\\\/749ccd9b2d74303fa8927e06c2af8b0b\",\"name\":\"3SL\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cee8089745b3e7d79c57d621cc634da71def3561fcf40d4932a3e38743e23af0?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cee8089745b3e7d79c57d621cc634da71def3561fcf40d4932a3e38743e23af0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cee8089745b3e7d79c57d621cc634da71def3561fcf40d4932a3e38743e23af0?s=96&d=mm&r=g\",\"caption\":\"3SL\"},\"sameAs\":[\"http:\\\/\\\/www.threesl.com\\\/\",\"https:\\\/\\\/x.com\\\/threesl\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Category Validation - 3SL Blog","description":"Category verification test to ensure categories contain sensible data","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.threesl.com\/blog\/category-validation\/","og_locale":"en_GB","og_type":"article","og_title":"Category Validation - 3SL Blog","og_description":"Category verification test to ensure categories contain sensible data","og_url":"https:\/\/www.threesl.com\/blog\/category-validation\/","og_site_name":"3SL Blog","article_publisher":"http:\/\/facebook.com\/3SLCradle","article_published_time":"2016-05-05T11:23:39+00:00","article_modified_time":"2019-12-02T08:46:57+00:00","og_image":[{"url":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/02\/Image1-1.png","type":"","width":"","height":""}],"author":"3SL","twitter_card":"summary_large_image","twitter_creator":"@threesl","twitter_site":"@threesl","twitter_misc":{"Written by":"3SL","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.threesl.com\/blog\/category-validation\/#article","isPartOf":{"@id":"https:\/\/www.threesl.com\/blog\/category-validation\/"},"author":{"name":"3SL","@id":"https:\/\/www.threesl.com\/blog\/#\/schema\/person\/749ccd9b2d74303fa8927e06c2af8b0b"},"headline":"Category Validation","datePublished":"2016-05-05T11:23:39+00:00","dateModified":"2019-12-02T08:46:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.threesl.com\/blog\/category-validation\/"},"wordCount":109,"publisher":{"@id":"https:\/\/www.threesl.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.threesl.com\/blog\/category-validation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/02\/Image1-1.png","keywords":["categories","testing","validation &amp; verification"],"articleSection":["Hints &amp; Tips"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/www.threesl.com\/blog\/category-validation\/","url":"https:\/\/www.threesl.com\/blog\/category-validation\/","name":"Category Validation - 3SL Blog","isPartOf":{"@id":"https:\/\/www.threesl.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.threesl.com\/blog\/category-validation\/#primaryimage"},"image":{"@id":"https:\/\/www.threesl.com\/blog\/category-validation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/02\/Image1-1.png","datePublished":"2016-05-05T11:23:39+00:00","dateModified":"2019-12-02T08:46:57+00:00","description":"Category verification test to ensure categories contain sensible data","breadcrumb":{"@id":"https:\/\/www.threesl.com\/blog\/category-validation\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.threesl.com\/blog\/category-validation\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.threesl.com\/blog\/category-validation\/#primaryimage","url":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/02\/Image1-1.png","contentUrl":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/02\/Image1-1.png","width":637,"height":462,"caption":"Category Validation"},{"@type":"BreadcrumbList","@id":"https:\/\/www.threesl.com\/blog\/category-validation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.threesl.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Category Validation"}]},{"@type":"WebSite","@id":"https:\/\/www.threesl.com\/blog\/#website","url":"https:\/\/www.threesl.com\/blog\/","name":"3SL Blog","description":"From concept to creation","publisher":{"@id":"https:\/\/www.threesl.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.threesl.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.threesl.com\/blog\/#organization","name":"3SL","url":"https:\/\/www.threesl.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.threesl.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/02\/3SL_Logo_Medium.png","contentUrl":"https:\/\/www.threesl.com\/blog\/wp-content\/uploads\/2017\/02\/3SL_Logo_Medium.png","width":152,"height":80,"caption":"3SL"},"image":{"@id":"https:\/\/www.threesl.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/facebook.com\/3SLCradle","https:\/\/x.com\/threesl"]},{"@type":"Person","@id":"https:\/\/www.threesl.com\/blog\/#\/schema\/person\/749ccd9b2d74303fa8927e06c2af8b0b","name":"3SL","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/cee8089745b3e7d79c57d621cc634da71def3561fcf40d4932a3e38743e23af0?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cee8089745b3e7d79c57d621cc634da71def3561fcf40d4932a3e38743e23af0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cee8089745b3e7d79c57d621cc634da71def3561fcf40d4932a3e38743e23af0?s=96&d=mm&r=g","caption":"3SL"},"sameAs":["http:\/\/www.threesl.com\/","https:\/\/x.com\/threesl"]}]}},"modified_by":null,"_links":{"self":[{"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/posts\/146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/comments?post=146"}],"version-history":[{"count":8,"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/posts\/146\/revisions"}],"predecessor-version":[{"id":5556,"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/posts\/146\/revisions\/5556"}],"wp:attachment":[{"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/media?parent=146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/categories?post=146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.threesl.com\/blog\/wp-json\/wp\/v2\/tags?post=146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}