View Source Bonfire.Common.Repo.Utils (bonfire v0.3.5-classic-beta.10)

Helper functions for changesets

Link to this section Summary

Functions

Keeps disabled_at in accord with is_disabled

Keeps muted_at in accord with is_muted

Keeps published_at in accord with is_public

Validates an email for correctness

Link to this section Functions

Link to this function

change_disabled(changeset)

View Source
@spec change_disabled(Ecto.Changeset.t()) :: Ecto.Changeset.t()

Keeps disabled_at in accord with is_disabled

@spec change_muted(Ecto.Changeset.t()) :: Ecto.Changeset.t()

Keeps muted_at in accord with is_muted

Link to this function

change_public(changeset)

View Source
@spec change_public(Ecto.Changeset.t()) :: Ecto.Changeset.t()

Keeps published_at in accord with is_public

Link to this function

validate_email(changeset, field)

View Source
@spec validate_email(Ecto.Changeset.t(), atom()) :: Ecto.Changeset.t()

Validates an email for correctness

Link to this function

validate_email_domain(changeset, field)

View Source
@spec validate_email_domain(Ecto.Changeset.t(), atom()) :: Ecto.Changeset.t()