is v1.0.0 Is.Validators.Boolean View Source

Validation for boolean.

Examples

iex> Is.validate(true, :boolean)
[]

iex> Is.validate(1, :boolean)
[{:error, [], "must be a boolean"}]

iex> Is.validate(true, boolean: false)
[{:error, [], "must not be a boolean"}]

iex> Is.validate(true, [boolean: false])
[{:error, [], "must not be a boolean"}]

Link to this section Summary

Link to this section Functions