ecto_fields v0.0.2 EctoFields.Email

Summary

Functions

Validate that the given value is a valid email

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(email)

Validate that the given value is a valid email

## Examples

iex> EctoFields.Email.cast(“foo.bar@example.com/“) :error

iex> EctoFields.Email.cast(“foo.bar@example.com.”) :error

iex> EctoFields.Email.cast(“test@example.com