Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

IsMongoID

  • IsMongoID(validationOptions?: ValidationOptions): (object: any, propertyName: string) => void
  • Decorator that checks if the property is a MongoID.

    Example

    class IsMongoIDDemo {
    @IsMongoID('en-US')
    @IsMongoID()
    id:string = '507f1f77bcf86cd799439011'
    }

    Parameters

    Returns (object: any, propertyName: string) => void

      • (object: any, propertyName: string): void
      • Parameters

        • object: any
        • propertyName: string

        Returns void

validateArray

validateValue

  • Value is valid if it passes the {@link isMongoId} check.

    Parameters

    • vc: ValidationContext

      The validation context.

    • o: any

      The object containing the property to validate.

    Returns boolean

    The result of the call to {@link isMongoId}

Generated using TypeDoc