How can I validate that my desc field is required and my category field is optional?
class Mydoc(Document):
structure = {
"name": unicode,
"items": [{
"category": int,
"desc": unicode
}]
}
required_fields = ["name", "items", "items.desc"] # Error: items has no attribute
# desc, it is a list not a dict.
How can I validate the categories inside the list?
UPDATE
https://groups.google.com/forum/?fromgroups=#!topic/mongokit/GP5AgaMG6T4