Open rkeet opened 6 years ago
// Remove trailing '/' char from tld string if present
if (substr($this->tld, -1) === '/') {
$this->tld = substr($this->tld, 0, -1);
}
I would suggest this after line 2052 in Hostname.php file.
This repository has been closed and moved to laminas/laminas-validator; a new issue has been opened at https://github.com/laminas/laminas-validator/issues/3.
If you run any hostname through UriNormalize, at some point the
normalize
function in the Uri module is run. This module callsnormalizePath
function.This function appends a
/
to the end of the URI.Next, when you try to validate the URI with
Hostname
validator with'useTldCheck' => true,
in the options, it will always fail.Steps to reproduce
Have the following in a fieldset
Have the following in an InputFilter:
I've got a few more issues reported that I'm solving, next to projects and a full-time job, I most likely will not have time to fix this. Would appreciate someone stepping in to fix this one. If not I might get around to it after other issues in zend-form and/or zend-inputfilter are finished.