Constructor
new Invalid()
A constraint that always invalid
- Since
- 1.3.0
- Copyright
- schukai GmbH
- License
- AGPLv3
Example
import {Invalid} from '@schukai/monster/source/constraints/invalid.mjs';
new Invalid().isValid()
.then(() => console.log(true))
.catch(() => console.log(false));
// ↦ false
Members
(static) instanceSymbol
This method is called by the
instanceof
operator.This method is called by the instanceof
operator.
- Since
- 2.1.0
Methods
isValid(value) → {Promise}
this method return a rejected promise
.this method return a rejected promise
Parameters:
Name | Type | Description |
---|---|---|
value | * |
Returns:
- Type:
- Promise