Validating Top Level Domainsに問題があります。 TLDとして.tech
のものは基本的に電子メールの検証に失敗しています。Zend 1でトップレベルドメインを検証する
私はこのプロジェクトを継承しており、Zendはよくわかりませんが、ホスト名が有効ではないという問題を再現しました。here is the code on GitHub;
// Match hostname part
if ($this->_options['domain']) {
$hostname = $this->_validateHostnamePart();
}
$local = $this->_validateLocalPart();
// If both parts valid, return true
if ($local && $length) {
if (($this->_options['domain'] && $hostname) || !$this->_options['domain']) {
return true;
}
}
return false;
ここでは、いくつかのローカルコードがあります。
class Form_InviteToSpaceForm extends Twitter_Bootstrap_Form_Horizontal
{
public function init()
{
// Set the method for the display form to POST
$this->setMethod('post');
$this->setAction('/team');
$this->addElement('textarea', 'email', array(
'label' => 'Email addresses',
'dimension' => 10,
'required' => true,
'placeholder' => "[email protected] [email protected]",//line breaks don't work on placeholders, have to force line wrap with spaces
'filters' => array('StringTrim'),
'validators' => array(
array('validator' => 'NotEmpty'),
array('validator' => 'EmailAddress', 'options' => array('messages' => array('emailAddressInvalidFormat' => 'Incorrect email address specified.')))
)
));
私は、この全体の検証が回避され、最後array('messages' => array('emailAddressInvalidFormat' => 'Incorrect email address specified.')))
を持つ行をコメントアウトした場合。しかし、私はこれを使用しないでください。私はちょうど.tech
を伸ばすことができることを望んでいるか、または本物のクライアントから出て来るものが何であれ。 Zendでこれをどうすればいいですか?
を渡すことができます - のように聞こえます悪いデザインですが、あなたがリンクしたドキュメントは、それをオフにする方法を説明しています。 – symcbean