{"id":2476,"date":"2024-12-31T20:22:33","date_gmt":"2024-12-31T20:22:33","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/solved-validate-class-not-found-from-basename-in-magento-2\/"},"modified":"2025-07-16T15:18:48","modified_gmt":"2025-07-16T09:48:48","slug":"validate-class-not-found-from-basename-in-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/validate-class-not-found-from-basename-in-magento-2\/","title":{"rendered":"Solved: Validate Class Not Found from Basename in Magento 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Are you facing Validate Class not Found from Basename error in Magento 2? If yes, then here is the complete solution for it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">User experience and checkout convenience of website plays a vital role in the success of eCommerce businesses. A poor&nbsp;<a href=\"https:\/\/meetanshi.com\/magento-2-user-experience-extensions.html\" target=\"_blank\" rel=\"noreferrer noopener\">user experience<\/a>&nbsp;can lead to less conversions and thus can affect the overall growth of your&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/start-online-business\/\" target=\"_blank\" rel=\"noreferrer noopener\">online business<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Magento 2\u00a0provides a seamless shopping experience to the customers through its quick and convenient checkout process. However, sometimes, it may show the \u2018Validate Class not Found\u2019 error to the customers that can prevent them from completing their purchase and can affect the conversion rate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following error is displayed to the customers on the checkout page, whenever the they tries to place the order using email address:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"> Validate class not found from basename\n Magento\\Framework\\Validator\\EmailAddress<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Solving this error becomes highly important for the Magento 2 store owners as it may worsen the user experience. Here, in this post, I have provided complete solution to prevent the&nbsp;<em><strong>Validate Class Not Found from Basename in Magento 2&nbsp;<\/strong><\/em>error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to Solve Validate Class not Found from Basename in Magento 2?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In order to solve the \u2018Validate Class not Found from Baseame\u2019 in Magento 2, you need to open the&nbsp;<em><strong>Loader.php<\/strong><\/em>&nbsp;file from&nbsp;<strong>vendor\/magento\/zendframework1\/library\/Zend\/<\/strong>&nbsp;and update the code as f0llowing:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public static function isReadable($filename)\n    {\n        if (is_readable($filename)) {\n            \/\/ Return early if the filename is readable without needing the\n            \/\/ include_path\n            return true;\n        }\n \n        if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN'\n            &amp;amp;&amp;amp; preg_match('\/^[a-z]:\/i', $filename)\n        ) {\n            \/\/ If on windows, and path provided is clearly an absolute path,\n            \/\/ return false immediately\n            return false;\n        }\n \n        foreach (self::explodeIncludePath() as $path) {\n            if ($path == '.') {\n                if (self::is_readable2($filename)) {\n                    return true;\n                }\n                continue;\n            }\n            $file = $path . '\/' . $filename;\n            if (self::is_readable2($file)) {\n                return true;\n            }\n        }\n        return false;\n    }\n \n    private static function is_readable2($filename) {\n        try {\n            return is_readable($filename);\n        } catch (Exception $ex) {\n            return false;\n        }\n    }<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Or<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The error \u2018Validate Class not Found from Baseame\u2019 in Magento 2 appears to the customers at the time of placing an order on the checkout page which is displayed as shown below:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/03\/image001-2-1-1.jpg\" alt=\"The error \u2018Validate Class not Found from Baseame\u2019 in Magento\" class=\"wp-image-50676\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">To get your error solved easily,&nbsp; you simply need to choose the most appropriate directory path for your website. You should not select the pub directory path, but need to opt for main path where app library vendor directory is available.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2022\/03\/updated-1.png\" alt=\"include path option field\" class=\"wp-image-50677\" style=\"width:700px;height:auto\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I hope you will find this solution helpful for the \u2018Validate Class not Found from Basename\u2019 error in Magento 2. Likewise&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/sqlstate42s22-column-not-found-1054-unknown-column-in-magento-2-admin-grid-massaction\/\">solve SQLSTATE[42S22] in Magento 2<\/a>&nbsp;admin grid massaction, it is one of the most common errors that is displayed when a certain column is not found in the database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, do not forget to share this solution with your Magento friends via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks for reading! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you facing Validate Class not Found from Basename error in Magento 2? If yes, then here is the complete solution for it. User experience&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-2476","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/2476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=2476"}],"version-history":[{"count":5,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/2476\/revisions"}],"predecessor-version":[{"id":17971,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/2476\/revisions\/17971"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=2476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=2476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=2476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}