Well... I think that when there is no error by validation $this->_messages
is empty...
So why should the chain break when there is no failure ?
This is expected behaviour. Only when there is a validation error all
further validations are supressed.
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com
----- Original Message -----
From: "Yann Thomas-Gérard" <[EMAIL PROTECTED]>
To: <fw-general@lists.zend.com>
Sent: Wednesday, September 24, 2008 6:02 PM
Subject: Re: [fw-general] Breakchain on Zend_Form_Element_File fail
Thomas Weidner a écrit :
I think that you should use the trunk to have this feature working.
Breakchainonfailure has been added a few days ago for the file element.
Hi Thomas,
With the trunk, I still can't get it to work and although the adapter's
addValidator now receives $breakChainOnFailure.
I think there's an error in the isValid method in
Zend/File/Transfer/Adapter/Abstract.php.
The test:
if (($this->_break[$class]) and (count($this->_messages) > 0)) {
$break = true;
break;
}
is never true because of the count($this->_messages) always to zero.
If I do this:
if ($this->_break[$class]) {
$break = true;
break;
}
Then the file element is always valid and that is an error too.
Again, what do you think ?
Thanks,
Yann