# `Localize.Script.Ecto.Type`
[🔗](https://github.com/elixir-localize/localize_sql/blob/v1.0.1/lib/localize/script/ecto/type.ex#L1)

An `Ecto.Type` storing a script as its code in a text column.

A script is identified by its ISO 15924 code — `:Latn`, `:Cyrl`,
`:Hant` — and that code is what is stored, in an ordinary text column.
Values cast and load as the validated code atom, so an unknown script
is rejected on the way in.

### Schema

    # in a migration
    add :script, :string

    # in a schema
    field :script, Localize.Script.Ecto.Type

### Casting

`cast/1` accepts a code as an atom (`:Latn`) or a string (`"Latn"`), and
validates it against `Localize.validate_script/1`.

# `embed_as`

# `equal?`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
