couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Trivial Update of "Document_Update_Validation" by BramNeijt
Date Mon, 27 Dec 2010 10:02:34 GMT
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.'};
        }"

Mime
View raw message