module:MValidator

module:MValidator

Abstract validator.

Constructor

(abstract) new (require("MValidator"))(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

validate()

Description:
  • Implement this method in child class to raise MValidationFailedException exception if the validation fails.