The AndOperator is used to link several contraints. The constraint is fulfilled if all constraints of the operators are fulfilled.
<script type="module">
import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.6.0/dist/modules/constraints/andoperator.js';
new Monster.Constraint.AndOperator(new Monster.Constraint.Valid(), new Monster.Constraint.Valid()).then(()=>console.log(true)).catch(()=>console.log(false));
</script>
Alternatively, you can also integrate this function individually.
<script type="module">
import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.6.0/dist/modules/constraint/valid.js';
import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.6.0/dist/modules/constraints/andoperator.js';
new AndOperator(new Valid(), new Valid()).then(()=>console.log(true)).catch(()=>console.log(false));
</script>