added validate_doc_update function