Monster.Constraints. AbstractConstraint

Constraints are used to define conditions that must be met by the value of a variable.

The uniform API of the constraints allows chains to be formed.

The abstract constraint defines the api for all constraints. mainly the method isValid() is defined.

Derived classes must implement the method isValid().

Constructor

new AbstractConstraint()

The abstract constraint

Since
  • 1.3.0
License
  • AGPLv3

Methods

isValid(value) → {Promise}

this method must return a promise containing the result of the check.

this method must return a promise containing the result of the check.

Parameters:
NameTypeDescription
value*
Returns:
Type: 
Promise