You are correct; validation functions cannot modify documents.

On Wed, Sep 22, 2010 at 3:06 PM, sleepy <[email protected]> wrote:
> Thanks for your answer.
>
> I tried to add a date in an update handler and it works.
> Now I'm curious. Can I add create date using validation function?
>
> It seems Couch doesn't allow me to change the doc in a validation function.
>
> 2010/9/23 Mirko Kiefer <[email protected]>
>
>> Hi, you can simply get the date through
>> var date = new Date();
>>
>> the object is documented here:
>> http://www.w3schools.com/js/js_obj_date.asp
>>
>> On Sep 22, 2010, at 5:35 PM, sleepy wrote:
>>
>> > Is there a way to get server time in validation function? I need that
>> > information in order to avoid data with future date-time
>> > Or can I record create date of a document using server time which is
>> ensured
>> > by server?
>> >
>> > sleepnova
>>
>>
>

Reply via email to