View Source Veli.Validators.Match (Veli v0.2.1)

Match validator. Uses regex if match value is a regex sigil. Otherwise compares both values.

example

Example

rule = [type: :string, match: ~r/^https?/]
Veli.valid("https://example.com", rule)

Link to this section Summary

Link to this section Functions

@spec valid?(any(), any()) :: boolean()