Hi Bryce,

Im a little concerned regarding your decision to validate an empty string.
This should not be a default behaviour of a validator class.
Bill Karwin new Zend_Filter_input allready deals with this by allowing to
set an option to allow a emptry string when such a behaviour is wanted.

allowEmpty = true

If you make this a default it will only become harder to check for valid
results in my opinion. 

I also hope that the changes will not be that hard to refactor in my source.
Becuase im allready heavily depended on the Zend_Validate classes. Currently
all implemented trough the new Zend_Filter_Input written by Bill which in my
opinion is a great solution.

I do agree however that the messages should not be hardcoded but left as
some short of an option. Im currently using an extra array called messages
with my own preffed message in it. When an invalid field is detected. I use
the field index to get the right message from my own message array.

Whatever is decided on I really hope that a stable situation for Filter and
Validate will come soon. As in my opinion a good solution for filtering and
validating user input is maybe the most important part of any good
framework.


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
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Proposed-backward-incompatible-changes-to-Zend_Validate_*-classes-tf3769731s16154.html#a10665724
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to