Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

IsUUID

  • IsUUID(target?: 3 | 4 | 5, validationOptions?: ValidationOptions): (object: any, propertyName: string) => void
  • Decorator that checks the property is a UUID.

    Example

    class IsUUIDDemo {
    @IsUUID()
    alpha:string = 'A987FBC9-4BED-3078-CF07-9141BA07C9F3'
    }

    Parameters

    • Optional target: 3 | 4 | 5

      The target version number [3 | 4 | 5].

    • Optional validationOptions: ValidationOptions

      The validation options

    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 isUUID} 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 isUUID}

Generated using TypeDoc