Skip to content

Instantly share code, notes, and snippets.

View Ivor's full-sized avatar

Ivor Paul Ivor

View GitHub Profile
@nicbet
nicbet / _Webpack-Fontawesome-Bootstrap-Phoenix.md
Last active April 28, 2020 05:43
Sass versions of Bootstrap 4 and Fontawesome 5 with Elixir / Phoenix Framework 1.3.x and 1.4.x using Webpack

SASS Versions of

  • Fontawesome 5
  • Bootstrap 4

in Phoenix 1.3 and 1.4 via Webpack

@doc """
Validate each array element with validator
Examples
iex> changeset
...> |> validate_each(:emails, &validate_email)
...> |> validate_each(:phones, &validate_format(&1, &2, ~r/\d+/))
...> |> validate_each(:phones, &validate_length/3, is: 4)
"""
def validate_each(changeset, field, validator, opts) do