Constructor
new Invalid()
- Source:
- Since:
- 1.3.0
- Copyright:
- schukai GmbH
Methods
isValid(value) → {Promise}
- Source:
this method return a rejected promise
Parameters:
| Name | Type | Description |
|---|---|---|
value |
* |
Returns:
- Type
- Promise
the invalid constraint allows an always invalid query to be performed. this contraint is mainly intended for testing.
you can call the method via the monster namespace new Monster.Constraint.Invalid().
<script type="module">
import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.2.1/dist/modules/constraint/invalid.js';
new Monster.Constraint.Invalid().catch(()=>console.log(true));
</script>
Alternatively, you can also integrate this function individually.
<script type="module">
import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.2.1/dist/modules/constraint/invalid.js';
new Invalid().catch(()=>console.log(true));
</script>
this method return a rejected promise
| Name | Type | Description |
|---|---|---|
value |
* |