Gregor Horvath schrieb:

> 
> A hack could be:
> 

Sorry, correction: I meant to tweak the class attribute not the instance
attribute:

>>> validators.Int._messages['integer'] = 'test'
>>> i = validators.Int() #called somewhere in TG widget code
>>> i.to_python("ten")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File
"/usr/lib/python2.4/site-packages/FormEncode-0.5.1-py2.4.egg/formencode/api.py",
line 322, in to_python
    value = tp(value, state)
  File
"/usr/lib/python2.4/site-packages/FormEncode-0.5.1-py2.4.egg/formencode/validators.py",
line 906, in _to_python
    value, state)
formencode.api.Invalid: test

--
Greg

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

Reply via email to