{"id":384644,"date":"2023-05-31T07:04:21","date_gmt":"2023-05-31T07:04:21","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=384644"},"modified":"2023-06-01T07:45:57","modified_gmt":"2023-06-01T07:45:57","slug":"custom-validation-before-order-placement","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/","title":{"rendered":"Custom validation before order placement"},"content":{"rendered":"\n<p>In this topic, we are going to discuss how we  can add custom validation before the order \u00a0is placed during checkout.These are the custom validation set when customers click Place Order button and some validations, restrictions or verifications need to be done set before the placing orders.<\/p>\n\n\n\n<p>\u00a0The custom validations is helpful in many situations Like , if you don\u2019t offer shipping in a specific city and you want to validate the customer has not selected that city then you can validate its input. if its not match the value then you can show this message<\/p>\n\n\n\n<p>To add custom validations before the order placement action, we need to do the following things.<\/p>\n\n\n\n<p><strong>Step 1 : \u2013&nbsp;Firstly create a module using this blog<\/strong>&nbsp;<a href=\"https:\/\/webkul.com\/blog\/magento-development-01-module-registration\/\">Click Here<\/a>.<\/p>\n\n\n\n<p><strong>Step 2 :-&nbsp;After Creating the module , You need to create the following new file:<\/strong><\/p>\n\n\n\n<p>In your custom module directory, create a&nbsp;<code>.js<\/code>&nbsp;file implementing the validator. It should be located under&nbsp;<code>&lt;your_module_dir&gt;\/view\/frontend\/web\/js\/model<\/code>&nbsp;directory.<\/p>\n\n\n\n<p>add the following code in the below file &amp; It must necessarily implement the&nbsp;<code>validate()<\/code>&nbsp;method:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">define(\n    &#091;&#039;mage\/translate&#039;, &#039;Magento_Ui\/js\/model\/messageList&#039;],\n    function ($t, messageList) {\n        &#039;use strict&#039;;\n        return {\n            validate: function () {\n                const isValid = false; \/\/Put your validation logic here\n\n                if (!isValid) {\n                    messageList.addErrorMessage({ message: $t(&#039;Validation message here....  &#039;) });\n                }\n\n                return isValid;\n            }\n        }\n    }\n);<\/pre>\n\n\n\n<p><strong>Step 3: Add validator to the validators pool<\/strong><\/p>\n\n\n\n<p>validator must be added to the pool of &#8220;additional validators&#8221;. To do this, in the&nbsp;<code>&lt;your_module_dir&gt;\/view\/frontend\/web\/js\/view<\/code>&nbsp;directory create a new file &nbsp;<code>&lt;your-validation&gt;.js<\/code>&nbsp; and add  the below code:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">define(\n    &#091;\n        &#039;uiComponent&#039;,\n        &#039;Magento_Checkout\/js\/model\/payment\/additional-validators&#039;,\n        &#039;&lt;your_module&gt;\/js\/model\/your-validator&#039;\n    ],\n    function (Component, additionalValidators, yourValidator) {\n        &#039;use strict&#039;;\n        additionalValidators.registerValidator(yourValidator);\n        return Component.extend({});\n    }\n);<\/pre>\n\n\n\n<p><strong>Step 4: Declare the validation in the checkout file <a href=\"https:\/\/developer.adobe.com\/commerce\/php\/tutorials\/frontend\/custom-checkout\/add-order-validation\/#step-3-declare-the-validation-in-the-checkout-layout\"><\/a><a href=\"https:\/\/developer.adobe.com\/commerce\/php\/tutorials\/frontend\/custom-checkout\/add-order-validation\/#step-2-add-validator-to-the-validators-pool\"><\/a><\/strong><\/p>\n\n\n\n<p>In your custom module directory, create a new&nbsp;file <code>&lt;your_module_dir&gt;\/view\/frontend\/layout\/checkout_index_index.xml<\/code>&nbsp;.<\/p>\n\n\n\n<p>In this file, add the below code:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;page xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; layout=&quot;1column&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd&quot;&gt;\n    &lt;body&gt;\n&lt;referenceBlock name=&quot;checkout.root&quot;&gt;\n    &lt;arguments&gt;\n        &lt;argument name=&quot;jsLayout&quot; xsi:type=&quot;array&quot;&gt;\n            &lt;item name=&quot;components&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;checkout&quot; xsi:type=&quot;array&quot;&gt;\n                    &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n                        &lt;item name=&quot;steps&quot; xsi:type=&quot;array&quot;&gt;\n                            &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n                                &lt;item name=&quot;billing-step&quot; xsi:type=&quot;array&quot;&gt;\n                                    &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n                                        &lt;item name=&quot;payment&quot; xsi:type=&quot;array&quot;&gt;\n                                            &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n                                                &lt;item name=&quot;additional-payment-validators&quot; xsi:type=&quot;array&quot;&gt;\n                                                    &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n                                                        &lt;!-- Declare your validation. START --&gt;\n                                                        &lt;item name=&quot;your-validator&quot; xsi:type=&quot;array&quot;&gt;\n                                                            &lt;item name=&quot;component&quot; xsi:type=&quot;string&quot;&gt;%your_module_dir%\/js\/view\/%your-validation%&lt;\/item&gt;\n                                                        &lt;\/item&gt;\n                                                        &lt;!-- Declare your validation. END --&gt;\n                                                    &lt;\/item&gt;\n                                                &lt;\/item&gt;\n                                            &lt;\/item&gt;\n                                        &lt;\/item&gt;\n                                    &lt;\/item&gt;\n                                &lt;\/item&gt;\n                            &lt;\/item&gt;\n                        &lt;\/item&gt;\n                    &lt;\/item&gt;\n                &lt;\/item&gt;\n            &lt;\/item&gt;\n        &lt;\/argument&gt;\n    &lt;\/arguments&gt;\n&lt;\/referenceBlock&gt;\n    &lt;\/body&gt;\n&lt;\/page&gt;<\/pre>\n\n\n\n<p>The custom validation message will be look like this.<strong>\ud83d\ude0a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"601\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20-1200x601.png\" alt=\"Screenshot-from-2023-06-01-12-53-20\" class=\"wp-image-384959\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20-1200x601.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20-300x150.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20-250x125.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20-768x385.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20.png 1287w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>If you want to add Additional info on the Checkout Payment Page you can checkout our blog\u00a0<a href=\"https:\/\/webkul.com\/blog\/additional-info-on-the-checkout-payment-page\/\">click here<\/a> .<\/p>\n\n\n\n<p>If you want to add Additional info after the checkout coupon code then you can follow this blog <a href=\"https:\/\/webkul.com\/blog\/additional-info-after-the-checkout-coupon-code\/\" target=\"_blank\" rel=\"noreferrer noopener\">click here<\/a><\/p>\n\n\n\n<p>You can check it out the magento blog how you can\u00a0<strong>Add custom validations before order placement<\/strong>\u00a0<a href=\"https:\/\/developer.adobe.com\/commerce\/php\/tutorials\/frontend\/custom-checkout\/add-order-validation\/\" target=\"_blank\" rel=\"noreferrer noopener\">Click here<\/a><\/p>\n\n\n\n<p>I hope you like this blog \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this topic, we are going to discuss how we can add custom validation before the order \u00a0is placed during checkout.These are the custom validation set when customers click Place Order button and some validations, restrictions or verifications need to be done set before the placing orders. \u00a0The custom validations is helpful in many situations <a href=\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":385,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9121],"tags":[2070],"class_list":["post-384644","post","type-post","status-publish","format-standard","hentry","category-magento-2","tag-magento2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Custom validation before order placement - Webkul Blog<\/title>\n<meta name=\"description\" content=\"In this topic, we are going to discuss how we can add custom validation before the order \u00a0is placed during checkout.These are the custom\" \/>\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\/custom-validation-before-order-placement\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Custom validation before order placement - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"In this topic, we are going to discuss how we can add custom validation before the order \u00a0is placed during checkout.These are the custom\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/\" \/>\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=\"2023-05-31T07:04:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-01T07:45:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20-1200x601.png\" \/>\n<meta name=\"author\" content=\"Ajay Singh\" \/>\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=\"Ajay Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/\"},\"author\":{\"name\":\"Ajay Singh\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/83ccffc2cbfde72f906f933bdc7dd20b\"},\"headline\":\"Custom validation before order placement\",\"datePublished\":\"2023-05-31T07:04:21+00:00\",\"dateModified\":\"2023-06-01T07:45:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/\"},\"wordCount\":318,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20-1200x601.png\",\"keywords\":[\"Magento2\"],\"articleSection\":[\"Magento 2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/\",\"url\":\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/\",\"name\":\"Custom validation before order placement - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20-1200x601.png\",\"datePublished\":\"2023-05-31T07:04:21+00:00\",\"dateModified\":\"2023-06-01T07:45:57+00:00\",\"description\":\"In this topic, we are going to discuss how we can add custom validation before the order \u00a0is placed during checkout.These are the custom\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20.png\",\"width\":1287,\"height\":645,\"caption\":\"Screenshot-from-2023-06-01-12-53-20\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custom validation before order placement\"}]},{\"@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\/83ccffc2cbfde72f906f933bdc7dd20b\",\"name\":\"Ajay Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/46a7f9944537c94d9679948e225a481f8cff0658565777b37cc5ecdd128881cb?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/46a7f9944537c94d9679948e225a481f8cff0658565777b37cc5ecdd128881cb?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Ajay Singh\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/ajaysingh-magento149\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Custom validation before order placement - Webkul Blog","description":"In this topic, we are going to discuss how we can add custom validation before the order \u00a0is placed during checkout.These are the custom","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\/custom-validation-before-order-placement\/","og_locale":"en_US","og_type":"article","og_title":"Custom validation before order placement - Webkul Blog","og_description":"In this topic, we are going to discuss how we can add custom validation before the order \u00a0is placed during checkout.These are the custom","og_url":"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-05-31T07:04:21+00:00","article_modified_time":"2023-06-01T07:45:57+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20-1200x601.png","type":"","width":"","height":""}],"author":"Ajay Singh","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Ajay Singh","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/"},"author":{"name":"Ajay Singh","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/83ccffc2cbfde72f906f933bdc7dd20b"},"headline":"Custom validation before order placement","datePublished":"2023-05-31T07:04:21+00:00","dateModified":"2023-06-01T07:45:57+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/"},"wordCount":318,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20-1200x601.png","keywords":["Magento2"],"articleSection":["Magento 2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/","url":"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/","name":"Custom validation before order placement - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20-1200x601.png","datePublished":"2023-05-31T07:04:21+00:00","dateModified":"2023-06-01T07:45:57+00:00","description":"In this topic, we are going to discuss how we can add custom validation before the order \u00a0is placed during checkout.These are the custom","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/06\/Screenshot-from-2023-06-01-12-53-20.png","width":1287,"height":645,"caption":"Screenshot-from-2023-06-01-12-53-20"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/custom-validation-before-order-placement\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Custom validation before order placement"}]},{"@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\/83ccffc2cbfde72f906f933bdc7dd20b","name":"Ajay Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/46a7f9944537c94d9679948e225a481f8cff0658565777b37cc5ecdd128881cb?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/46a7f9944537c94d9679948e225a481f8cff0658565777b37cc5ecdd128881cb?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Ajay Singh"},"url":"https:\/\/webkul.com\/blog\/author\/ajaysingh-magento149\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/384644","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\/385"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=384644"}],"version-history":[{"count":2,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/384644\/revisions"}],"predecessor-version":[{"id":384979,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/384644\/revisions\/384979"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=384644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=384644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=384644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}