ecto_fields v0.0.1 EctoFields.URL

Summary

Functions

Validate that the given value is a valid fully qualified url

Callback implementation for c:Ecto.Type.dump/1

Callback implementation for c:Ecto.Type.load/1

Callback implementation for c:Ecto.Type.type/0

Functions

cast(url)

Validate that the given value is a valid fully qualified url

## Examples

iex> EctoFields.URL.cast(“http://example.com”) “http://example.com

iex> EctoFields.URL.cast(“https://example.com”) “https://example.com

iex> EctoFields.URL.cast(“http://example.com/test/foo.html?search=1&page=two#header”) “http://example.com/test/foo.html?search=1&page=two#header

iex> EctoFields.URL.cast(“myblog.html”) :error

iex> EctoFields.URL.cast(“http://example.comlog irst”) :error

dump(url)

Callback implementation for c:Ecto.Type.dump/1.

load(url)

Callback implementation for c:Ecto.Type.load/1.

type()

Callback implementation for c:Ecto.Type.type/0.