Add first step of creating an Article

This commit is contained in:
Thelonius Kort
2022-12-27 23:23:16 +01:00
parent bdc12d6b06
commit 5cbf05f650
12 changed files with 211 additions and 6 deletions

View File

@ -0,0 +1,16 @@
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