Today, I have come across a bug in my Zend Framework application. This is the case:
I have a form with an element that has a regex validator on it. When testing the form, I found out that I can not provide the value 0 for the element. Zend gives me an error, telling me that I have not filled in the element.
The element:
$element = $this->createElement( "text", "amount", array( "label" => "Amount", "required" => true ) );
$element->addValidator( 'regex', false, array( '/^[-]?([0-9]+)(([,.][0-9]+)+)?$/' ) );
Can anyone tell me what the reason might be that Zend tells me I have not filled in the element when the submitted value is 0?
Thx