ecto_fields v1.3.0 EctoFields.IPv6
Link to this section Summary
Functions
Validate that the given value is a valid ipv6
Callback implementation for Ecto.Type.dump/1
.
Callback implementation for Ecto.Type.equal?/2
.
Callback implementation for Ecto.Type.load/1
.
Callback implementation for Ecto.Type.type/0
.
Link to this section Functions
Link to this function
cast(ip)
Validate that the given value is a valid ipv6
Examples
iex> EctoFields.IPv6.cast("2001:1620:28:1:b6f:8bca:93:a116")
{:ok, "2001:1620:28:1:b6f:8bca:93:a116"}
iex> EctoFields.IPv6.cast("192.168.10.1")
:error
iex> EctoFields.IPv6.cast("http://example.com")
:error
Link to this function
dump(ip)
Callback implementation for Ecto.Type.dump/1
.
Link to this function
embed_as(_)
Link to this function
equal?(a, b)
Callback implementation for Ecto.Type.equal?/2
.
Link to this function
load(ip)
Callback implementation for Ecto.Type.load/1
.
Link to this function
type()
Callback implementation for Ecto.Type.type/0
.