Use is to check a type or allow several types.
var schema = {
name: { is: 'string' },
age: { is: 'integer' },
email: { is: 'email' },
active: { is: 'boolean' },
tags: { is: 'array' },
website: { is: ['url', 'null'] }
}
Other types include object, number, date, datestring, isodate, uuid, and uuidv7. See the type reference for the complete list.
Next: Rules →