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 RussellBranca:
http://wiki.apache.org/couchdb/Document_Update_Validation?action=diff&rev1=8&rev2=9

Comment:
Update validate_doc_update documentation to explicitly list allowable error 
types

    a. name - String user name
    a. roles - Array of roles to which user belongs. Currently only admin role 
is supported.
   1. secObj - The security object of the database (introduced in 
CouchDB-0.11.1).
+ 
+ == Error Formats ==
+ 
+ Thrown errors must be javascript objects with a key of either "forbidden" or 
"unauthorized," and a value with the error message:
+ 
+ {{{
+ throw({forbidden: 'Error message here.'});
+ }}}
+ or
+ {{{
+ throw({unauthorized: 'Error message here.'});
+ }}}
  
  == Toolbox ==
  Some of these functions are found in 
http://guide.couchdb.org/draft/validation.html . Use them inside your 
validate_doc_update functions.

Reply via email to