module:MFormatter

module:MFormatter

Abstract formatter.

Constructor

(abstract) new (require("MFormatter"))(fieldInstance, onKeyUp, onFocusOut)

Description:
  • Constructor.

Parameters:
Name Type Description
fieldInstance MField

Field instance.

onKeyUp boolean

Whether to validate on keyup event.

onFocusOut boolean

Whether to validate on focusout event.

Methods

onKeyUp() → {boolean}

Description:
  • Property method.

Returns:

Value.

Type
boolean

onFocusOut() → {boolean}

Description:
  • Property method.

Returns:

Value.

Type
boolean

format()

Description:
  • Implement this method in child class to format the provided value and return it.