You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2010/12/27 11:02:34 UTC

[Couchdb Wiki] Trivial Update of "Document_Update_Validation" by BramNeijt

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Document_Update_Validation" page has been changed by BramNeijt.
The comment on this change is: Add quotes to allow for copy-pasting json.
http://wiki.apache.org/couchdb/Document_Update_Validation?action=diff&rev1=1&rev2=2

--------------------------------------------------

  
  {{{#!highlight javascript
  {
-    _id: "_design/myview",
+    "_id": "_design/myview",
-    validate_doc_update: "function(newDoc, oldDoc, userCtx) {
+    "validate_doc_update": "function(newDoc, oldDoc, userCtx) {
        if(newDoc.address === undefined) {
           throw {forbidden: 'Document must have an address.'};
        }"