Thanks for the reply Karl!
I was trying your suggestion but I haven't been able to get it to work
yet. Below is my custom validator based on FormValidator (modified
from FieldsMatch):
class MyCustomValidator(validators.FormValidator):
field_names = None
__unpackargs__ = ('*', 'field_names')
def validate_python(self, field_dict, state):
ed = field_dict.get('eventdate', '')
try:
if field_dict.has_key('allday'):
ed = validators.DateConverter()
else:
ed = validators.DateTimeConverter()
except:
raise Invalid(self.message('badFormat', state), ed,
state)
I know that MyCustomValidator is getting the variables allday and
eventdate. However, I'm then trying to pass eventdate to
DateConverter() or DateTimeConverter() to do the validation and I'm
expecting it to pass back the return value or else throw an exception.
I'm not sure but it doesn't seem to be doing either.
Does anyone know what I'm doing wrong? Thanks!
Frank
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---