php - How to find PhpNamespaceReferenceImpl in Zend FrameWork?

one text

Solution:

The file is located in folder vendor/zendframework/zend-validator/src/EmailAddress.php, as stated by the namespace.. You can even find it on github

However, I discourage you to modify that specific file. On the first update, all your edits will be wiped out.

The right solution would be to create a new custom validator:

namespace YourNamespace\Validator;

use Zend\Validator\EmailAddress;

class YourEmailAddress extends EmailAddress
{
    public function isValid($value)
    {
        // Your validation logic..
    }
}

Then, where you need it:

$userEmailInput->getValidatorChain()->addValidator(new YourNamespace\Validator\YourEmailAddress());

Source