1 function(newDoc, oldDoc, userCtx)
3 function require(doc, field, message)
5 message = message || "Document must have a " + field;
6 if (doc[field] == void 0 || doc[field] == null || doc[field].length == 0)
8 throw({forbidden: message});
12 if(newDoc.doc_type == "Episode")
14 require(newDoc, "urls");
15 require(newDoc, "podcast");