{"id":307476,"date":"2021-09-28T19:06:07","date_gmt":"2021-09-28T19:06:07","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=307476"},"modified":"2024-07-26T08:50:35","modified_gmt":"2024-07-26T08:50:35","slug":"add-validation-in-system-configuration-fields-before-saving-the-information","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/","title":{"rendered":"Add validation in system configuration fields before saving the information"},"content":{"rendered":"\n<p>Hello Friends!<br><br>In this blog, we will learn how we can add validation in the store configuration fields before clicking on the Save Config button or before saving the information.<br><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><br>If you want to learn some other ways to add validation in the system.xml file. Then check the following links:<br><br><a href=\"https:\/\/webkul.com\/blog\/validate-system-xml-fields-data-when-saving-the-configuration\/\" target=\"_blank\" rel=\"noreferrer noopener\">Validate system.xml fields data when saving the configuration<\/a><br><a href=\"https:\/\/webkul.com\/blog\/add-custom-validation-in-the-input-field-in-the-system-xml\/\" target=\"_blank\" rel=\"noreferrer noopener\">Add custom validation in the input field in the system.xml<\/a><br><\/p>\n<\/blockquote>\n\n\n\n<p>To add the validation before saving the information, please follow the below steps:<\/p>\n\n\n\n<p>1. Create <strong>adminhtml_system_config_edit<\/strong>.<strong>xml<\/strong> file inside the app\/code\/Vendor\/CustomModule\/view\/adminhtml\/layout\/ directory. In this file, we will use &lt;referenceContainer name=&#8221;js&#8221;> which is defined in vendor\/magento\/module-config\/view\/adminhtml\/layout\/adminhtml_system_config_edit.xml<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?xml version=&quot;1.0&quot;?&gt;\n\n&lt;page xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; \n      xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd&quot;&gt;\n    &lt;body&gt;\n        &lt;referenceContainer name=&quot;js&quot;&gt;\n            &lt;block class=&quot;Magento\\Backend\\Block\\Template&quot; \n                   template=&quot;Vendor_CustomModule::stores\/system\/config\/js.phtml&quot;\/&gt;\n        &lt;\/referenceContainer&gt;\n    &lt;\/body&gt;\n&lt;\/page&gt;<\/pre>\n\n\n\n<p><strong>2. Create js.phtml file inside the app\/code\/Vendor\/CustomModule\/view\/adminhtml\/templates\/stores\/system\/config\/ directory. In this file, we will write our validation code in jquery.<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php ?&gt;\n\n&lt;!--\n\/**\n * Vendor Desc.\n *\n * @category  Vendor\n * @package   Vendor_CustomModule\n * @author    Vendor\n * @copyright Vendor (https:\/\/example.com)\n * @license   https:\/\/example.com\/license.html\n *\/\n--&gt;\n&lt;script type=&quot;text\/javascript&quot;&gt;\n    require(&#091;\n        &quot;jquery&quot;,\n        &quot;prototype&quot;\n    ], function($){\n\n        \/\/ here you can write your validation code for input fields as per your requirement\n\n        $(document).ready(function(){\n            function checkValue() {\n                var obj = $(&#039;#custommodule_general_name_sort_order&#039;);\n                var value = obj.val();\n                if (value != &#039;&#039;) {\n                    obj.css(&#039;border&#039;, &#039;2px solid green&#039;);\n                } else {\n                    obj.css(&#039;border&#039;, &#039;2px solid red&#039;);\n                }\n            }\n            $(&#039;#custommodule_general_name_sort_order&#039;).change(checkValue);\n        });\n    });\n&lt;\/script&gt;<\/pre>\n\n\n\n<p><strong>3. Now, create the system.xml file inside the app\/code\/Vendor\/CustomModule\/etc\/adminhtml\/ directory.<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;..\/..\/..\/Config\/etc\/system_file.xsd&quot;&gt;\n    &lt;system&gt;\n        &lt;tab id=&quot;vendorname&quot; translate=&quot;label&quot; sortOrder=&quot;10&quot;&gt;\n            &lt;label&gt;Vendor&lt;\/label&gt;\n        &lt;\/tab&gt;\n        &lt;section id=&quot;custommodule&quot; translate=&quot;label&quot; sortOrder=&quot;10&quot; showInDefault=&quot;1&quot; showInWebsite=&quot;1&quot; showInStore=&quot;1&quot;&gt;\n            &lt;label&gt;Custom Module Configuration&lt;\/label&gt;\n            &lt;tab&gt;vendorname&lt;\/tab&gt;\n            &lt;resource&gt;Vendor_CustomModule::config_blogs&lt;\/resource&gt;\n            &lt;group id=&quot;general&quot; translate=&quot;label&quot; sortOrder=&quot;10&quot; showInDefault=&quot;1&quot; showInWebsite=&quot;1&quot; showInStore=&quot;1&quot;&gt;\n                &lt;label&gt;Display Product Attributes Sort Order Settings&lt;\/label&gt;\n                &lt;field id=&quot;name_sort_order&quot; translate=&quot;label&quot; type=&quot;text&quot; sortOrder=&quot;10&quot; showInDefault=&quot;1&quot; showInWebsite=&quot;1&quot; showInStore=&quot;1&quot;&gt;\n                    &lt;label&gt;Sort Order for ProductName&lt;\/label&gt;\n                    &lt;validate&gt;required-entry&lt;\/validate&gt;\n                &lt;\/field&gt;\n                &lt;field id=&quot;price_sort_order&quot; translate=&quot;label&quot; type=&quot;text&quot; sortOrder=&quot;10&quot; showInDefault=&quot;1&quot; showInWebsite=&quot;1&quot; showInStore=&quot;1&quot;&gt;\n                    &lt;label&gt;Sort Order for Price&lt;\/label&gt;\n                    &lt;validate&gt;required-entry&lt;\/validate&gt;\n                &lt;\/field&gt;\n            &lt;\/group&gt;\n        &lt;\/section&gt;\n    &lt;\/system&gt;\n&lt;\/config&gt;<\/pre>\n\n\n\n<p><strong>4. See the result in the below images. <\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"478\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1-1200x478.png\" alt=\"configResult1\" class=\"wp-image-307479\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1-1200x478.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1-300x120.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1-250x100.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1-768x306.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1-1536x612.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1.png 1786w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><figcaption class=\"wp-element-caption\">Result: When the input field is empty<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"1200\" height=\"493\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult2-1200x493.png\" alt=\"configResult2\" class=\"wp-image-307480\" style=\"width:820px;height:336px\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult2-1200x493.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult2-300x123.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult2-250x103.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult2-768x315.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult2-1536x631.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult2.png 1829w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><figcaption class=\"wp-element-caption\">Result: When the input field is filled<\/figcaption><\/figure>\n\n\n\n<p>Hope this will be helpful. Thanks \ud83d\ude42<br><br><strong>Previous Blog:<\/strong> <a href=\"1052\" target=\"_blank\" rel=\"noreferrer noopener\">Fixed: SQLSTATE[23000]: Integrity constraint violation: 1052<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello Friends! In this blog, we will learn how we can add validation in the store configuration fields before clicking on the Save Config button or before saving the information. If you want to learn some other ways to add validation in the system.xml file. Then check the following links: Validate system.xml fields data when <a href=\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":249,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9121],"tags":[12113,12115,1907],"class_list":["post-307476","post","type-post","status-publish","format-standard","hentry","category-magento-2","tag-custom-validation-class","tag-custom-validation-in-system-xml","tag-system-xml"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Add validation in system configuration<\/title>\n<meta name=\"description\" content=\"how we can add validation in the store configuration fields before clicking on the Save Config button or before saving the information.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add validation in system configuration\" \/>\n<meta property=\"og:description\" content=\"how we can add validation in the store configuration fields before clicking on the Save Config button or before saving the information.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-28T19:06:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-26T08:50:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1-1200x478.png\" \/>\n<meta name=\"author\" content=\"Khushboo Sahu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Khushboo Sahu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. 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:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/\"},\"author\":{\"name\":\"Khushboo Sahu\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/f94b8f53397bf85810761d76c98fadca\"},\"headline\":\"Add validation in system configuration fields before saving the information\",\"datePublished\":\"2021-09-28T19:06:07+00:00\",\"dateModified\":\"2024-07-26T08:50:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/\"},\"wordCount\":213,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1-1200x478.png\",\"keywords\":[\"custom validation class\",\"custom validation in system.xml\",\"system.xml\"],\"articleSection\":[\"Magento 2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/\",\"url\":\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/\",\"name\":\"Add validation in system configuration\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1-1200x478.png\",\"datePublished\":\"2021-09-28T19:06:07+00:00\",\"dateModified\":\"2024-07-26T08:50:35+00:00\",\"description\":\"how we can add validation in the store configuration fields before clicking on the Save Config button or before saving the information.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1.png\",\"width\":1786,\"height\":712,\"caption\":\"configResult1\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Add validation in system configuration fields before saving the information\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/f94b8f53397bf85810761d76c98fadca\",\"name\":\"Khushboo Sahu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cabac965df656d114e6bf340df07518c990eda03bb09265dbd5c17f1097adaae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cabac965df656d114e6bf340df07518c990eda03bb09265dbd5c17f1097adaae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"caption\":\"Khushboo Sahu\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/khushboo-sahu062\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Add validation in system configuration","description":"how we can add validation in the store configuration fields before clicking on the Save Config button or before saving the information.","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:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/","og_locale":"en_US","og_type":"article","og_title":"Add validation in system configuration","og_description":"how we can add validation in the store configuration fields before clicking on the Save Config button or before saving the information.","og_url":"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2021-09-28T19:06:07+00:00","article_modified_time":"2024-07-26T08:50:35+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1-1200x478.png","type":"","width":"","height":""}],"author":"Khushboo Sahu","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Khushboo Sahu","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/"},"author":{"name":"Khushboo Sahu","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/f94b8f53397bf85810761d76c98fadca"},"headline":"Add validation in system configuration fields before saving the information","datePublished":"2021-09-28T19:06:07+00:00","dateModified":"2024-07-26T08:50:35+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/"},"wordCount":213,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1-1200x478.png","keywords":["custom validation class","custom validation in system.xml","system.xml"],"articleSection":["Magento 2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/","url":"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/","name":"Add validation in system configuration","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1-1200x478.png","datePublished":"2021-09-28T19:06:07+00:00","dateModified":"2024-07-26T08:50:35+00:00","description":"how we can add validation in the store configuration fields before clicking on the Save Config button or before saving the information.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/09\/configResult1.png","width":1786,"height":712,"caption":"configResult1"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/add-validation-in-system-configuration-fields-before-saving-the-information\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Add validation in system configuration fields before saving the information"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/f94b8f53397bf85810761d76c98fadca","name":"Khushboo Sahu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cabac965df656d114e6bf340df07518c990eda03bb09265dbd5c17f1097adaae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cabac965df656d114e6bf340df07518c990eda03bb09265dbd5c17f1097adaae?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","caption":"Khushboo Sahu"},"url":"https:\/\/webkul.com\/blog\/author\/khushboo-sahu062\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/307476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/249"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=307476"}],"version-history":[{"count":4,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/307476\/revisions"}],"predecessor-version":[{"id":454919,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/307476\/revisions\/454919"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=307476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=307476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=307476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}