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 and checkout convenience of website plays a vital role in the success of eCommerce businesses. A poor user experience can lead to less conversions and thus can affect the overall growth of your online business.
Magento 2 provides a seamless shopping experience to the customers through its quick and convenient checkout process. However, sometimes, it may show the ‘Validate Class not Found’ error to the customers that can prevent them from completing their purchase and can affect the conversion rate.
The following error is displayed to the customers on the checkout page, whenever the they tries to place the order using email address:
Validate class not found from basename Magento\Framework\Validator\EmailAddress
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 Validate Class Not Found from Basename in Magento 2 error.
How to Solve Validate Class not Found from Basename in Magento 2?
In order to solve the ‘Validate Class not Found from Baseame’ in Magento 2, you need to open the Loader.php file from vendor/magento/zendframework1/library/Zend/ and update the code as f0llowing:
public static function isReadable($filename) { if (is_readable($filename)) { // Return early if the filename is readable without needing the // include_path return true; } if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' && preg_match('/^[a-z]:/i', $filename) ) { // If on windows, and path provided is clearly an absolute path, // return false immediately return false; } foreach (self::explodeIncludePath() as $path) { if ($path == '.') { if (self::is_readable2($filename)) { return true; } continue; } $file = $path . '/' . $filename; if (self::is_readable2($file)) { return true; } } return false; } private static function is_readable2($filename) { try { return is_readable($filename); } catch (Exception $ex) { return false; } }
Or
The error ‘Validate Class not Found from Baseame’ in Magento 2 appears to the customers at the time of placing an order on the checkout page which is displayed as shown below:

To get your error solved easily, 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.

That’s it!
I hope you will find this solution helpful for the ‘Validate Class not Found from Basename’ error in Magento 2. Likewise solve SQLSTATE[42S22] in Magento 2 admin grid massaction, it is one of the most common errors that is displayed when a certain column is not found in the database.
Also, do not forget to share this solution with your Magento friends via social media.
Thanks for reading!