View Source Veli.Validators.Run (Veli v0.2.7)
Allows you to add custom filter function. Any other value than false
will computed as true
.
example
Example
rule = [type: :integer, run: fn x -> rem(x, 2) === 0 end]
Veli.valid(2, rule) # valid
Veli.valid(3, rule) # not valid