couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <>
Subject validate_doc_update modifying doc?
Date Wed, 29 Apr 2009 05:26:02 GMT
There doesn't seem to be much documentation on validate_doc_update.

I'm assuming that it's not possible for this function to modify the document
it has been passed. Is that true? I was looking for somewhere for a 'model'
to perform some basic data cleaning, e.g.

1. trimming superfluous spaces
2. converting string values to number or boolean
3. adding 'updated_by', 'updated_at' values
4. adding IP address of updater, if the HTTP request object were available

But I guess that if validate_doc_update were able to do that, it would risk
breaking replication.



View raw message