defmodule Outlook.Articles.RawHtmlInput do
  use Ecto.Schema
  import Ecto.Changeset

  embedded_schema do
    field :content, :string
  end

  @doc false
  def changeset(html_input, attrs) do
    html_input
    |> cast(attrs, [:content])
    |> validate_required([:content])
    |> validate_length(:content, min: 200)
  end
end
