Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

IsNumberString

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

    Example

    class IsNumberStringDemo {
    @IsNumberString()
    alpha:number = '2'
    }

    Parameters

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

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

        • object: any
        • propertyName: string

        Returns void

validateArray

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

    Parameters

    Returns Number[]

    An empty array if valid, an array of indexes otherwise.

validateValue

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

    Parameters

    • vc: ValidationContext

      The validation context.

    • o: any

      The object containing the property to validate.

    Returns boolean

    True if the value is valid, false otherwise.

Generated using TypeDoc