View Source Kvasir.Type.URI (kvasir v0.0.18)

Any valid URI.

The URI validation can enforce specific host or scheme values, by default host and scheme can not be nil.

The following type of checks are allow:

  • nil, everything but nil allowed.
  • binary, any string to match.
  • regex, any regex to match.
  • list, any list of (string) values.

Link to this section Summary

Functions

Parse a Kvasir.Type.URI type value.

Link to this section Functions

Link to this function

parse!(value, opts \\ [])

View Source
@spec parse!(value :: any(), opts :: Keyword.t()) :: term() | no_return()

Parse a Kvasir.Type.URI type value.

examples

Examples

iex> Kvasir.Type.URI.parse!(pid())
** (Kvasir.InvalidType) Invalid Elixir.Kvasir.Type.URI type.