Skip to main content

boolean

Creates a schema that matches booleans.

const booleanSchema = boolean();
const booleanValidator = validate(booleanSchema);

// Returns true
const loading = booleanValidator(true);