Skip to content

Boolean

Alan Berdinelli edited this page Nov 3, 2020 · 1 revision

Boolean checks that the element is of the native boolean type.

Example

const schema = new Schemy({
    element: {
        type: Boolean
    }
});

schema.validate({type: true}); // => true
schema.validate({type: -1}); // => false

Clone this wiki locally