Closed atanaspuskulev closed 6 years ago
The warning is correct, because you are using a wrong value for the option allow
.
$validator = new Zend\Validator\EmailAddress(
[
'allow' => \Zend\Validator\Hostname::ALLOW_ALL, // <-- See here!
'useMxCheck' => false,
]
);
var_dump($validator->isValid('mail@example.com')); // true
Compare with the documentation and the supported options.
Please reduce your code example. Your problem is the validator. So there is no need to include zend-inputfilter and zend-filter. This will help us and we can help you much faster. Thanks!
Thanks!
Hello,
Validating a form email address with a \Zend\Validator\EmailAddress or \Zend\Validator\Hostname triggers an warning and does not properly validates.
OS: Windows 10 64bit, PHP: PHP 7.1.8 (cli) (built: Aug 1 2017 21:10:31) ( NTS MSVC14 (Visual C++ 2015) x86 )
Code to reproduce:
Output: