<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [git-documentdb](./git-documentdb.md) &gt; [Validator](./git-documentdb.validator.md) &gt; [validateDocument](./git-documentdb.validator.validatedocument.md)

## Validator.validateDocument() method

Validate document

<b>Signature:</b>

```typescript
validateDocument(doc: JsonDoc): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  doc | [JsonDoc](./git-documentdb.jsondoc.md) |  |

<b>Returns:</b>

void

## Exceptions

[InvalidPropertyNameInDocumentError](./git-documentdb.invalidpropertynameindocumenterror.md)

[UndefinedDocumentIdError](./git-documentdb.undefineddocumentiderror.md)

[InvalidIdCharacterError](./git-documentdb.invalididcharactererror.md)

[InvalidIdLengthError](./git-documentdb.invalididlengtherror.md)

## Remarks

- Key cannot start with an underscore \_. (For compatibility with CouchDB/PouchDB)

