Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Static

Callable

  • Creates a new Inputmask instance.

    Parameters

    • maskOrAlias: string

      A mask pattern or a reference to a predefined alias.

    • Optional opts: Options

      Mask options.

    Returns Instance

  • Creates a new Inputmask instance.

    Parameters

    • Optional opts: Options

      Mask options.

    Returns Instance

Index

Constructors

constructor

  • Creates a new Inputmask instance.

    Parameters

    • maskOrAlias: string

      A mask pattern or a reference to a predefined alias.

    • Optional opts: Options

      Mask options.

    Returns Instance

  • Creates a new Inputmask instance.

    Parameters

    • Optional opts: Options

      Mask options.

    Returns Instance

Methods

extendAliases

  • extendAliases(aliases: {}): void
  • Extends the set of available mask aliases.

    Parameters

    Returns void

extendDefaults

  • extendDefaults(opts: Options): void
  • Extends the default inputmask options.

    Parameters

    Returns void

extendDefinitions

  • extendDefinitions(definitions: {}): void
  • Extends the set of available definitions.

    Parameters

    Returns void

format

  • format(value: string, opts: Options): string
  • Instead of masking an input element it is also possible to use the inputmask for formatting given values. Think of formatting values to show in jqGrid or on other elements then inputs.

    Parameters

    • value: string

      Value to format.

    • opts: Options

      Mask options.

    Returns string

isValid

  • isValid(value: string, opts: Options): boolean
  • Validate a given value against the mask.

    Parameters

    • value: string

      Value to validate.

    • opts: Options

      Mask options.

    Returns boolean

remove

setValue

  • The setvalue functionality is to set a value to the inputmask like you would do with jQuery.val, BUT it will trigger the internal event used by the inputmask always, whatever the case. This is particular usefull when cloning an inputmask with jQuery.clone. Cloning an inputmask is not a fully functional clone. On the first event (mouseenter, focus, ...) the inputmask can detect if it where cloned and can reactivate the masking. However when setting the value with jQuery.val there is none of the events triggered in that case. The setvalue functionality does this for you.

    Parameters

    Returns void

unmask

  • unmask(value: string, opts: Options): string
  • Unmask a given value against the mask.

    Parameters

    • value: string

      Value to be unmasked.

    • opts: Options

      Mask options.

    Returns string

Generated using TypeDoc