loaders ยป boolean

boolean() โ†’ boolean
boolean_items() โ†’ list
boolean_list() โ†’ list

Accepts true, false, yes and no, returns a boolean (or raises an error for invalid values).

enoenabled: true
publish: no
visible: not
python>>> document = Eno.parse(input)

>>> document.boolean('enabled')
>>> document.boolean('publish')
>>> document.boolean('visible')
ValidationError: 'visible' must contain a boolean - allowed values are 'true', 'false', 'yes' and 'no'.