Hi all,
Trying to use the above in a TG2.1b2 project and am getting
"AttributeError: 'function' object has no attribute 'message'".  I
Googled around and don't find any comments about problems nor do I see
any bugs against USPostalCode in the BitBucket repository for
FormEncode.

I'm using it in a TableForm:

TextField('user_zip', size = 9, maxlength = 12,  label_text = 'Zip
Code:*  ', validator = USPostalCode)

I replaced USPostalCode with USPhoneNumber and didn't get the
AttributeError (and I can process the form) so I think it is an issue
with USPostalCode?

Also, tw.forms.validators does a "from formencode.validators import *"
and in formencode.validators.py I see:

def PostalCode(*kw, **kwargs):
    warnings.warn("please use formencode.national.USPostalCode",
DeprecationWarning, stacklevel=2)
    from formencode.national import USPostalCode
    return USPostalCode(*kw, **kwargs)

so why does "tw.forms.validators import PostalCode" fail?

Thanks,
Eric

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

Reply via email to