Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

IsPatternMatch

  • IsPatternMatch(pattern: RegExp, modifiers?: number, validationOptions?: ValidationOptions): (object: any, propertyName: string) => void
  • Decorator that checks if the value matches the pattern.

    Example

    class IsPatternMatchDemo {
    @IsPatternMatch(/xyz/) alpha:string = 'xyz'
    }

    Parameters

    • pattern: RegExp

      The match pattern

    • Optional modifiers: number

      The modifiers

    • 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 matches} 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 matches}

Generated using TypeDoc