title: Zend_validate isValid() get stuck fatalError Maximum execution time of 30 seconds exceeded in /library/Zend/Validate/Hostname.php on line 608
body: <p>Iam suffering from Zend_validate ,when ever I write a form  and  try to add validators , the only thing that works for me if I submit the form with no values , it will show error msg , but if I submit good values it will stuck for sometime and then give fatal error msg saying Maximum execution time 30 seconds is exceeded in /Applications/MAMP/htdocs/MyApplicationFolderName/library/Zend/Validate/Hostname.php on line 608<br>
  Please help my controller action code is </p>
  
  <pre><code>public function createAction()
    {
      // action body
  
      $roleService=new User_Service_RoleService($this-&gt;em);
  
  
  
      $userForm=new User_Form_UserForm($roleService-&gt;listAllRoleNames());
      $userForm-&gt;startForm();
  
      $userForm-&gt;setAction('create');
      $userForm-&gt;setMethod('post');
  
  
  
      if($this-&gt;getRequest()-&gt;isPost() )
      {
          if($userForm-&gt;isValid($this-&gt;getRequest()-&gt;getPost()))
          {
          $this-&gt;userAccountService-&gt;createUser($this-&gt;getRequest()-&gt;getParams());
          $this-&gt;_forward('confirm');
          }
  
      }
  
  
  
  
  
      $this-&gt;view-&gt;form=$userForm;
  
  
  
  }
  </code></pre>
  
  <p>and my form class code is </p>
  
  <pre><code>class User_Form_UserForm extends Zend_Form {
  //put your code here
  
  private $roles;
  
  public function __construct($options = null) {
      parent::__construct($options);
  
  
      $this-&gt;roles=$options;
  
  
  }
  
  
  public function startForm()
  {
  
      $idForm=new Zend_Form_Element_Hidden('id');
      $this-&gt;addElement($idForm);
  
       ///////////          
      $userEmailForm=new Zend_Form_Element_Text('email');
      $userEmailForm-&gt;setRequired(TRUE);
      $userEmailForm-&gt;setLabel('Email');
  
      $emailValidator=new Zend_Validate_EmailAddress();
  
     // $emailValidator-&gt;setOptions(array('domain' =&gt; FALSE));
  
  
      $userEmailForm-&gt;addValidator($emailValidator,false);
  
      $userEmailForm-&gt;setAttrib('size', 25);
  
      $userEmailForm-&gt;setFilters(array(new Zend_Filter_StringToLower(),
                                       new Zend_Filter_StringTrim())
  
                                 );
  
      $this-&gt;addElement($userEmailForm);
  
  
  
  }
  
  
  
   }
  </code></pre>
  
  <p>This is small part of my form its so simple but not working Iam using MAMP PHP 5.3.5 because of Doctrine2 and name spaces</p>
  
  <p>Please any help will be really appreciated .</p>
  
  <p>Note I also tried other validators like string length and the same error showed.</p>