title: Regex email vaildation in Zend
body: <p>I'm using email validation of zend framework and when I give email address as abcde@gester.tech and it responded with invalid validation. Then I modifed the validation as below.</p>
  <pre><code>$emailValidator= new Validator\EmailAddress(Validator\Hostname::ALLOW_DNS | Validator\Hostname::ALLOW_LOCAL);
          $emailRegex= new Validator\Regex(
              array(
                  'pattern' =&gt; '/^(?:(?:[^&lt;&gt;()\[\]\\.,;:\s@&quot;]+(?:\.[^&lt;&gt;()\[\]\\.,;:\s@&quot;]+)*)|(?:&quot;.+&quot;))@(?:(?:\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(?:(?:[a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/',
                  'messages'=&gt;array(
                      'regexNotMatch'=&gt;'Make sure your email pattern is correct'
                  )
              )
          );
          $emailInp-&gt;getValidatorChain()-&gt;addValidator($emailValidator)-&gt;addValidator($emailRegex);
  </code></pre>
  <p>Now am able to pass the email address (abcde@gester.tech) with out validation error. But if I give the input as abcde@gester it also take as valid input. But I want to restrict that and I think this can be implemented by adding regex to this validation. May I know how to implement that.</p>
  <pre><code> $emailValidator= new Validator\EmailAddress(
              Validator\Hostname::ALLOW_DNS |
              Validator\Hostname::ALLOW_LOCAL);
          $emailRegex= Validator\Regex(array('pattern' =&gt; '/^(?:(?:[^&lt;&gt;()\[\]\\.,;:\s@&quot;]+(?:\.[^&lt;&gt;()\[\]\\.,;:\s@&quot;]+)*)|(?:&quot;.+&quot;))@(?:(?:\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(?:(?:[a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/'));
          $emailInp-&gt;getValidatorChain()-&gt;addValidator($emailValidator-&gt;addValidator($emailRegex));
  </code></pre>