UNPKG

561 BTypeScriptView Raw
1import { ValidationOptions } from '../ValidationOptions';
2export declare const IS_MONGO_ID = "isMongoId";
3/**
4 * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId.
5 * If given value is not a string, then it returns false.
6 */
7export declare function isMongoId(value: unknown): boolean;
8/**
9 * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId.
10 * If given value is not a string, then it returns false.
11 */
12export declare function IsMongoId(validationOptions?: ValidationOptions): PropertyDecorator;