Converters.py field2date() and :ignore_empty
If I have ignore_empty set in a variable name of type date, field2date() fails if the returned value is truly empty. I think field2date() should return None rather than trying to call DateTime with an empty string. I keep making this patch to each Zope release, but would like to talk about a more permanant and "correct" solution. What do others think? Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com AOL-IM: BKClements
Brad Clements wrote:
I keep making this patch to each Zope release, but would like to talk about a more permanant and "correct" solution. What do others think?
Validation as a whole could do with looking at, it's be great if there were hooks to catch validation problems rather than just raising exceptions... cheers, Chris
Chris Withers wrote:
Brad Clements wrote:
I keep making this patch to each Zope release, but would like to talk about a more permanant and "correct" solution. What do others think?
Validation as a whole could do with looking at, it's be great if there were hooks to catch validation problems rather than just raising exceptions...
Along with the TTW ability to define new variable types to be validated (and their validation methods), such as :email, :12hTime, :24hTime, :URL, :fqURL (fully qualified URL), and others. Michael Bernstein.
participants (3)
-
Brad Clements -
Chris Withers -
Michael Bernstein