View Source Franklin.Articles.Validations (Franklin v0.1.0)

Shared validation logic for Article-related attributes.

Link to this section Summary

Functions

Accepts and returns a Changeset of a Article and applies domain validation rules for the body attribute.

Accepts and returns a Changeset of a Article and applies domain validation rules for the id attribute.

Accepts and returns a Changeset of a Article and applies domain validation rules for the published_at attribute.

Accepts and returns a Changeset of a Article and applies domain validation rules for the slug attribute.

Accepts and returns a Changeset of a Article and applies domain validation rules for the title attribute.

Link to this section Functions

Link to this function

validate_body(changeset)

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

Accepts and returns a Changeset of a Article and applies domain validation rules for the body attribute.

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

Accepts and returns a Changeset of a Article and applies domain validation rules for the id attribute.

Link to this function

validate_published_at(changeset)

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

Accepts and returns a Changeset of a Article and applies domain validation rules for the published_at attribute.

Link to this function

validate_slug(changeset, opts \\ [])

View Source
@spec validate_slug(
  Ecto.Changeset.t(),
  keyword()
) :: Ecto.Changeset.t()

Accepts and returns a Changeset of a Article and applies domain validation rules for the slug attribute.

Link to this function

validate_title(changeset)

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

Accepts and returns a Changeset of a Article and applies domain validation rules for the title attribute.