Add document-level validation.