Hi Thomas,

Zend_Validate doesn't throw any Exceptions though. The errors are either set 
when constructing the Validation object (personal preference) or defined in a 
callback per Bryce's proposal. I was simply noting that alleviating some of the 
complexity in adding Validator information to the preset message would be nice. 
Whether an Error object of some description accepting strings with an optional 
parameter for a Zend_Translate object or otherwise.

The callback solution in Bryce's solution isn't bad by any means whatsoever, 
but it runs slightly against the grain of existing solutions which don't rely 
on a callback function.

Best regards,
Paddy
 
Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com


----- Original Message ----
From: Thomas Weidner <[EMAIL PROTECTED]>
To: Pádraic Brady <[EMAIL PROTECTED]>; Bryce Lohr <[EMAIL PROTECTED]>
Cc: Zend Framework General <[email protected]>
Sent: Thursday, May 17, 2007 9:17:07 AM
Subject: Re: [fw-general] Proposed backward-incompatible changes to 
Zend_Validate_* classes

Related to I18N translations:

We already discussed the problem of making exceptions multilingual.
When we integrate such a functionality it should not only be done for 
Zend_Validate but for the complete framework.
All other integrations would be nonsense in my opinion, if we make only one 
or two classes multilingual translateable.

There is already a related proposal... see
http://framework.zend.com/wiki/display/ZFPROP/Exception+codes+in+exceptions+-+Matthew+Ratzloff

Greetings
Thomas
I18N Team Leader

----- Original Message ----- 
From: "Pádraic Brady" <[EMAIL PROTECTED]>
To: "Bryce Lohr" <[EMAIL PROTECTED]>
Cc: "Zend Framework General" <[email protected]>
Sent: Thursday, May 17, 2007 10:01 AM
Subject: Re: [fw-general] Proposed backward-incompatible changes to 
Zend_Validate_* classes


Hi Bryce,

Currently using a homebrewed system which would be forgiving of change since 
it's automated with a Factory. If the change is worthwhile and others agree 
I have no problem with change.

I read your proposal yesterday. I think the main thing I don't fully agree 
with it is the external message handling. It might be just a pet peeve but 
I'd prefer a set of Zend_Validate_Error classes I can rely on to compose 
errors and integrate i18n translations easily without pushing more 
responsibility onto a controller. Ah, I'll comment on it later :). Otherwise 
it's solid and I definitely appreciate the work you put into it.

Pádraic

Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com


----- Original Message ----
From: Bryce Lohr <[EMAIL PROTECTED]>
To: Zend FW General List <[email protected]>
Sent: Thursday, May 17, 2007 3:50:53 AM
Subject: [fw-general] Proposed backward-incompatible changes to 
Zend_Validate_* classes

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








____________________________________________________________________________________Be
 
a better Globetrotter. Get better travel answers from someone who knows. 
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469 








 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

Reply via email to