ZF-2650: Zend_Validate::is() throws an exception with the wrong message

Issue Type: Bug Created: 2008-02-14T03:37:25.000+0000 Last Updated: 2008-03-21T16:25:37.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)

Reporter: Ronald ten Berge (rajh) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate

Related issues: Attachments:


The following code throws an exception with the wrong "Validate class not found from basename 'EmailAddress'" message. This is wrong because the real problem is that MX checking is not available on Windows.

<pre class="highlight">
Zend_Validate::is('', 'EmailAddress', array(Zend_Validate_Hostname::ALLOW_DNS, true));

The following code throws an exception with the right message "Internal error: MX checking not available on this system".

<pre class="highlight">
$objValidator = new Zend_Validate_EmailAddress(Zend_Validate_Hostname::ALLOW_DNS, true);

This can be fixed by changing

<pre class="highlight">
} catch (Zend_Exception $ze) {
    // fallthrough and continue


<pre class="highlight">
} catch (Zend_Exception $ze) {
    // Throw the exception of the specific validation class
    throw $ze;

In Validate.php, lines 152 - 155


Posted by Thomas Weidner (thomas) on 2008-03-10T06:45:10.000+0000

Your code is not right... this would import other problems.

Fixed with SVN-8729.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.