Getting Error Messages from Compound Validator
"Joshua T. Burnell" <hitekelvis-/[email protected]>
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
Hey, guys-
I've got a schema and I'd like to put a schema inside
it that would apply to a list. I've been using the
ForEach.
For example:
class PhoneSchema(Schema):
number = Number()
description = UnicodeString()
class UserSchema(Schema):
name = UnicodeString()
phone_numbers = ForEach(PhoneSchema)
Make sense? The problem is, if I validate the
UserSchema and there's any error triggered by any of
the PhoneSchemas, they come back with a generic
'Errors:\n'number':'Invalid number'. However, I'd
like to know in which repetition the error occurs.
Any ideas?
Thanks!
Josh
____________________________________________________________________________________
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
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/