Options
All
  • Public
  • Public/Protected
  • All
Menu
description

Checks length of string value

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • description

    Checks length of string value

    Parameters

    Returns IsLen

Properties

Private name

name: string

Methods

formatMessage

  • description

    This formats the formatter string and includes the variables in it from values object. The variable key must be surrounded by % char.

    example
    const formattedString = formatMessage('%name% should not be empty.', { name: 'Email' });
    // Returns 'Email should not be empty.'
    example
    // If the message contains actual `%` symbol, it should be prefixed with `-`.
    const formattedString = formatMessage('%name% should be greater than 90-%.',
     { name: 'Marks' }
    );
    // Returns 'Marks should be greater than 90%.'

    Parameters

    • formatter: string

      The format string.

    • values: IRuleFormatterValues

      Object containing key and value pairs used in formatter string.

    Returns string

    Returns formatted string

validate

  • description

    Validate the value and return the error string if there are any otherwise return undefined.

    Parameters

    Returns IRuleValidateReturn

Generated using TypeDoc