I have noticed that, removing the required validator ('required' => true, ), it
works. Anyway, is this a bug?
--- On Thu, 4/2/09, Andrei Iarus <[email protected]> wrote:
From: Andrei Iarus <[email protected]>
Subject: [fw-general] Zend Form Element Regex problem?
To: [email protected]
Date: Thursday, April 2, 2009, 8:47 PM
Hello,
After deploying ZF 1.7.8 (Minimal), and creating a form with a Form Element of
Regex type, I get the following error:
Fatal error: Cannot unset string offsets in
C:\wamp\www\my-project\library\Zend\Form\Element.php on line 2004
I use this:
$email = $this->addElement('text', 'email', array(
'filters' => array('StringTrim'),
'validators' => array(
array('Regex', false, ".*"),
array('StringLength', false, array(5, 255)),
),
'required' => true,
'label' => 'Email Address *',
));
Of course I wanted to use in the Regex Pattern a specific one, but just testing
this simple example, it died.
Is this a bug in ZF? Did someone else noticed the same problem?