Bryce -
I think the choice of whether a field is optional or not should be
determined at a level above the Zend_Validate_* classes. It just
doesn't make sense that passing an empty string to an integer validator
would result in a positive result. An empty string is not an integer,
and should therefore return a false result.
Dale
Bryce Lohr wrote:
Hi all,
I've proposed some changes to Zend_Validate_* classes that would not
be backward compatible. Specifically, I had proposed to change the
default behavior all the standard validators to consider the empty
string a valid value.
Now, I've been operating under the assumption that hardly anyone is
using the current Zend_Validate_* classes, due to the fact that it's a
hassle to validate a lot of data at once. I figured that if few people
were actually using these, then the cost of making this
backward-incompatible change was low. The benefit of the change is
that it would provide a lot of flexibility in the proposed
Zend_Validate_Builder class.
I may be way off base with my assumption here, so I'd like to find out
how many of you are actually using the current Zend_Validate_*
classes. Obviously, if a lot of people are, in fact, using them, then
it's not feasible to make this proposed change.
Regards,
Bryce Lohr
--
------------------------------------------------------------------------
Dale McNeill |
Alchemy Systems | phone: (512) 532-8050
http://www.alchemysystems.com | email: [EMAIL PROTECTED]
------------------------------------------------------------------------