Valid

Valid

the valid constraint allows an always valid query to be performed. this contraint is mainly intended for testing.

you can call the method via the monster namespace new Monster.Constraint.Valid().

<script type="module">
import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.2.1/dist/modules/constraint/valid.js';
new Monster.Constraint.Valid().then(()=>console.log(true));
</script>

Alternatively, you can also integrate this function individually.

<script type="module">
import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.2.1/dist/modules/constraint/valid.js';
new Valid().then(()=>console.log(true));
</script>

Constructor

new Valid()

Source:
Since:
  • 1.3.0

Methods

isValid(value) → {Promise}

Source:

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

Parameters:
Name Type Description
value *
Returns:
Type
Promise