View Source Veli.Validators.Type (Veli v0.2.2)
Type validator. Takes a tuple that contains a atom with nullable boolean.
atoms
Atoms
:string:integer:float:boolean
example
Example
rule = [type: :integer]
Veli.valid(2, rule) # valid
Veli.valid(4.2, rule) # not valid