{"id":150,"date":"2026-11-19T08:48:45","date_gmt":"2026-11-19T08:48:45","guid":{"rendered":"https:\/\/oddlylogical.com\/logical-forms\/?post_type=doc&#038;p=150"},"modified":"2026-11-23T00:00:16","modified_gmt":"2026-11-23T00:00:16","slug":"field-validation-and-masks","status":"publish","type":"doc","link":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/field-validation-and-masks\/","title":{"rendered":"Validation limits and Text input masks"},"content":{"rendered":"<p>Field validation decides which answers can be accepted. Configure the rules on the field, then use its custom messages or site-wide Messages to explain corrections. Browser feedback helps visitors, and the server checks applicable answers again.<\/p>\n<h2 id=\"required\">Required and optional answers<\/h2>\n<p>Required rejects an empty applicable answer. An optional empty answer can remain valid even when the field has a minimum character or selection count. Enable Required as well when the visitor must provide something.<\/p>\n<p>A conditionally inactive question does not require an answer in a public submission. Static Hidden visibility is different: its valid nonempty requirement can still apply, even though the visitor cannot see it.<\/p>\n<h2 id=\"limits\">Character, choice and numeric limits<\/h2>\n<p>Text and Paragraph provide Minimum\/Maximum characters; Rich Text validates readable text with its own editor limits. Counts apply after normalization, including interior spaces. They count Unicode code points rather than words or visible combined characters. Answers outside the limit are rejected rather than silently truncated.<\/p>\n<p>Supporting multiple-choice fields provide minimum and maximum selections. Number fields use inclusive minimum\/maximum and a positive step or Any. The step is an increment from its base, not a number of displayed decimal places. Configure Date, Time and uploads through their own field controls.<\/p>\n<figure class=\"lf-docs-shot\" id=\"lf-shot-field-validation-and-masks-1\" data-lf-docs-asset=\"S28-text-validation\" style=\"--lf-shot-width: 424px\">\n  <a href=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-text-validation.webp\" data-lf-docs-image data-native-width=\"848\" data-native-height=\"276\" aria-label=\"Enlarge screenshot: Choose minimum and maximum character counts in Advanced options.\"><br \/>\n    <img src=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-text-validation-424w.webp\" srcset=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-text-validation-320w.webp 320w, https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-text-validation-424w.webp 424w, https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-text-validation.webp 848w\" sizes=\"auto, (min-width: 1168px) 424px, (min-width: 992px) min(424px, calc(100vw - 337px)), (min-width: 768px) min(424px, calc(100vw - 278px)), min(424px, calc(100vw - 48px))\" width=\"848\" height=\"276\" alt=\"Complete Text Character limits group with blank Min and Max controls.\" loading=\"lazy\" decoding=\"async\"><br \/>\n  <\/a><figcaption>Choose minimum and maximum character counts in Advanced options.<\/figcaption><\/figure>\n<h2 id=\"mask\">Set a Text input mask<\/h2>\n<p>Text offers Input mask in Advanced: None, US ZIP code, US ZIP + 4, SSN, Product code or Custom. Choose Custom to enter a pattern.<\/p>\n<table>\n<thead>\n<tr>\n<th>Pattern<\/th>\n<th>Meaning<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>9<\/td>\n<td>ASCII digit<\/td>\n<\/tr>\n<tr>\n<td>a<\/td>\n<td>ASCII letter<\/td>\n<\/tr>\n<tr>\n<td>*<\/td>\n<td>ASCII letter or digit<\/td>\n<\/tr>\n<tr>\n<td>Other characters<\/td>\n<td>Literal punctuation\/text<\/td>\n<\/tr>\n<tr>\n<td>Backslash<\/td>\n<td>Escape the next pattern character<\/td>\n<\/tr>\n<tr>\n<td>[\u2026]<\/td>\n<td>One optional trailing group that must be complete when present<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><code>99999[-9999]<\/code> accepts <code>01234<\/code> or <code>01234-5678<\/code>, but not an incomplete suffix. <code>aa-9999<\/code> accepts a product reference such as <code>AB-0012<\/code>. Masks check format; a formatting preset does not verify a real postal address or identity.<\/p>\n<p>While a mask is enabled, its pattern owns the accepted length and the Text character-limit controls are inactive. Their saved values remain for when you remove the mask. Required is still independent. With JavaScript, supported paste can be formatted; without it, supply the formatted value including literals.<\/p>\n<figure class=\"lf-docs-shot\" id=\"lf-shot-field-validation-and-masks-2\" data-lf-docs-asset=\"S28-mask-preset\" style=\"--lf-shot-width: 424px\">\n  <a href=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-mask-preset.webp\" data-lf-docs-image data-native-width=\"848\" data-native-height=\"261\" aria-label=\"Enlarge screenshot: Choose a preset such as Product code for the expected input format.\"><br \/>\n    <img src=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-mask-preset-424w.webp\" srcset=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-mask-preset-320w.webp 320w, https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-mask-preset-424w.webp 424w, https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-mask-preset.webp 848w\" sizes=\"auto, (min-width: 1168px) 424px, (min-width: 992px) min(424px, calc(100vw - 337px)), (min-width: 768px) min(424px, calc(100vw - 278px)), min(424px, calc(100vw - 48px))\" width=\"848\" height=\"261\" alt=\"Text Advanced Input mask control set to Product code.\" loading=\"lazy\" decoding=\"async\"><br \/>\n  <\/a><figcaption>Choose a preset such as Product code for the expected input format.<\/figcaption><\/figure>\n<h2 id=\"messages\">Set understandable feedback<\/h2>\n<p>A field's Required\/Invalid value message takes priority where supported. Blank follows the relevant <a href=\"\/docs\/general-validation-messages\/\">site-wide Messages<\/a> or provider default. Use <a href=\"\/docs\/validation-limit-messages\/\">contextual limit tokens<\/a> for changing bounds rather than hard-coding a misleading global value.<\/p>\n<h2 id=\"test\">Test boundaries and changes<\/h2>\n<p>Try empty, just-below, valid-boundary and just-above values. Check a mask's optional ending both absent and complete. Changing rules does not rewrite historical entries; later submissions and explicit answer changes use current validation.<\/p>\n<p><a href=\"\/docs\/prevent-duplicate-answers\/\">Pro duplicate prevention<\/a> is a separate saved-entry check. A format-valid answer can still conflict with an already accepted value.<\/p>\n<figure class=\"lf-docs-shot\" id=\"lf-shot-field-validation-and-masks-3\" data-lf-docs-asset=\"S28-mask-example\" style=\"--lf-shot-width: 800px\">\n  <a href=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-mask-example.webp\" data-lf-docs-image data-native-width=\"2036\" data-native-height=\"301\" aria-label=\"Enlarge screenshot: The configured mask supplies a visible format hint for the visitor.\"><br \/>\n    <img src=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-mask-example-800w.webp\" srcset=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-mask-example-320w.webp 320w, https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-mask-example-640w.webp 640w, https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-mask-example-800w.webp 800w, https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-mask-example-1600w.webp 1600w\" sizes=\"auto, (min-width: 1168px) 800px, (min-width: 992px) min(800px, calc(100vw - 337px)), (min-width: 768px) min(800px, calc(100vw - 278px)), min(800px, calc(100vw - 48px))\" width=\"2036\" height=\"301\" alt=\"Text input containing fictitious AB-1234 with the format hint AA-0000.\" loading=\"lazy\" decoding=\"async\"><br \/>\n  <\/a><figcaption>The configured mask supplies a visible format hint for the visitor.<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Set required answers, character and selection limits, numeric bounds and Text masks, and distinguish validation rules from their message wording.<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":25,"template":"","doc-categories":[22],"class_list":["post-150","doc","type-doc","status-publish","hentry","doc_category-field-features"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Validation limits and Text input masks | Logical Forms Docs<\/title>\n<meta name=\"description\" content=\"Set required answers, character and selection limits, numeric bounds and Text masks, and distinguish validation rules from their message wording.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/field-validation-and-masks\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Validation limits and Text input masks | Logical Forms Docs\" \/>\n<meta property=\"og:description\" content=\"Set required answers, character and selection limits, numeric bounds and Text masks, and distinguish validation rules from their message wording.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/field-validation-and-masks\/\" \/>\n<meta property=\"og:site_name\" content=\"Logical Forms\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-23T00:00:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-text-validation-424w.webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/field-validation-and-masks\\\/\",\"url\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/field-validation-and-masks\\\/\",\"name\":\"Validation limits and Text input masks | Logical Forms Docs\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/field-validation-and-masks\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/field-validation-and-masks\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/logicalforms.io\\\/wp-content\\\/uploads\\\/sites\\\/14\\\/2026\\\/11\\\/lf-docs-s28-text-validation-424w.webp\",\"datePublished\":\"2026-11-19T08:48:45+00:00\",\"dateModified\":\"2026-11-23T00:00:16+00:00\",\"description\":\"Set required answers, character and selection limits, numeric bounds and Text masks, and distinguish validation rules from their message wording.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/field-validation-and-masks\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/field-validation-and-masks\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/field-validation-and-masks\\\/#primaryimage\",\"url\":\"https:\\\/\\\/logicalforms.io\\\/wp-content\\\/uploads\\\/sites\\\/14\\\/2026\\\/11\\\/lf-docs-s28-text-validation-424w.webp\",\"contentUrl\":\"https:\\\/\\\/logicalforms.io\\\/wp-content\\\/uploads\\\/sites\\\/14\\\/2026\\\/11\\\/lf-docs-s28-text-validation-424w.webp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/field-validation-and-masks\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documentation\",\"item\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Validation limits and Text input masks\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/#website\",\"url\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/\",\"name\":\"Logical Forms\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/oddlylogical.com\\\/logical-forms-old\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Validation limits and Text input masks | Logical Forms Docs","description":"Set required answers, character and selection limits, numeric bounds and Text masks, and distinguish validation rules from their message wording.","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:\/\/oddlylogical.com\/logical-forms-old\/docs\/field-validation-and-masks\/","og_locale":"en_US","og_type":"article","og_title":"Validation limits and Text input masks | Logical Forms Docs","og_description":"Set required answers, character and selection limits, numeric bounds and Text masks, and distinguish validation rules from their message wording.","og_url":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/field-validation-and-masks\/","og_site_name":"Logical Forms","article_modified_time":"2026-11-23T00:00:16+00:00","og_image":[{"url":"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-text-validation-424w.webp","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/field-validation-and-masks\/","url":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/field-validation-and-masks\/","name":"Validation limits and Text input masks | Logical Forms Docs","isPartOf":{"@id":"https:\/\/oddlylogical.com\/logical-forms-old\/#website"},"primaryImageOfPage":{"@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/field-validation-and-masks\/#primaryimage"},"image":{"@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/field-validation-and-masks\/#primaryimage"},"thumbnailUrl":"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-text-validation-424w.webp","datePublished":"2026-11-19T08:48:45+00:00","dateModified":"2026-11-23T00:00:16+00:00","description":"Set required answers, character and selection limits, numeric bounds and Text masks, and distinguish validation rules from their message wording.","breadcrumb":{"@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/field-validation-and-masks\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/oddlylogical.com\/logical-forms-old\/docs\/field-validation-and-masks\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/field-validation-and-masks\/#primaryimage","url":"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-text-validation-424w.webp","contentUrl":"https:\/\/logicalforms.io\/wp-content\/uploads\/sites\/14\/2026\/11\/lf-docs-s28-text-validation-424w.webp"},{"@type":"BreadcrumbList","@id":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/field-validation-and-masks\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/oddlylogical.com\/logical-forms-old\/"},{"@type":"ListItem","position":2,"name":"Documentation","item":"https:\/\/oddlylogical.com\/logical-forms-old\/docs\/"},{"@type":"ListItem","position":3,"name":"Validation limits and Text input masks"}]},{"@type":"WebSite","@id":"https:\/\/oddlylogical.com\/logical-forms-old\/#website","url":"https:\/\/oddlylogical.com\/logical-forms-old\/","name":"Logical Forms","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/oddlylogical.com\/logical-forms-old\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/docs\/150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/types\/doc"}],"author":[{"embeddable":true,"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":3,"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/docs\/150\/revisions"}],"predecessor-version":[{"id":458,"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/docs\/150\/revisions\/458"}],"wp:attachment":[{"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/media?parent=150"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/oddlylogical.com\/logical-forms-old\/wp-json\/wp\/v2\/doc-categories?post=150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}