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

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


Parse a Kvasir.Type.URI type value.

Link to this section Functions

Link to this function

parse!(value, opts \\ [])

View Source


parse!(value :: any(), opts :: Keyword.t()) :: term() | no_return()

Parse a Kvasir.Type.URI type value.


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