<!-- 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; [validateCollectionPath](./git-documentdb.validator.validatecollectionpath.md)

## Validator.validateCollectionPath() method

Validate collectionPath

<b>Signature:</b>

```typescript
validateCollectionPath(collectionPath: string): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  collectionPath | string |  |

<b>Returns:</b>

void

## Exceptions

[InvalidCollectionPathCharacterError](./git-documentdb.invalidcollectionpathcharactererror.md)

[InvalidCollectionPathLengthError](./git-documentdb.invalidcollectionpathlengtherror.md)

## Remarks

- A directory name allows Unicode characters excluding OS reserved filenames and following characters: &lt; &gt; : " \| ? \* \\<!-- -->0

- A directory name cannot end with a period or a white space.

- A directory name does not allow '.' and '..'.

- collectionPath cannot start with a slash / or an underscore \_.

- Trailing slash could be omitted. e.g.) 'pages' and 'pages/' show the same collection.

