Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

errorMessage

  • The generated error message string indicating that the value is not valid according to {@link isAfterInstant}.

    Parameters

    Returns (vc: ValidationContext, o: any) => string

    The error message.

      • The generated error message string indicating that the value is not valid according to {@link isAfterInstant}.

        Parameters

        Returns string

        The error message.

errorMessageTemplate

  • Generic message template function.

    Parameters

    • vc: ValidationContext

      The validation context

    • o: any

      The object being validated

    • messageLiteral: string

      The message literal

    Returns string

    The error message.

getPropertyKey

  • getPropertyKey(target: any, propertyName: string): string
  • Creates the validation context key used to lookup the array of ValidationContext instances.

    Example

    For a class name Order of the instance being validated and the property date the value return is Order_date.

    getPropertyKey('Order', 'date')//returns `Order_date`.

    @param target The object or name of the object constructor
    @param propertyName
    @return The key for the array of ValidationContext instances.

    Parameters

    • target: any
    • propertyName: string

    Returns string

getValidationContextSignature

  • getValidationContextSignature(decorator: string, targetName: string, propertyName: string): string
  • The signature for the decorator, class, and class property combination.

    Example

    The ValidationContext signature formed from the IfValid annotation applied to the purchasePrice property of a SalesOrder instance.

    IfValid_SalesOrder_purchasePrice
    

    Parameters

    • decorator: string
    • targetName: string
    • propertyName: string

    Returns string

Generated using TypeDoc