Skip to content

Home > @opengovsg/validators > PathValidatorOptions

PathValidatorOptions interface ​

The options to use for path validation.

Signature:

typescript
export interface PathValidatorOptions

Properties ​

PropertyModifiersTypeDescription
basePathstring

The base path to use for validation. This must be an absolute path.

All provided paths, resolved relative to the working directory of the Node process, must be within this directory (or its subdirectories), or they will be considered unsafe. You should provide a safe base path that does not contain sensitive files or directories.