     timestamps()
   end
 
-  @required_fields ~w(name)
-  @optional_fields ~w(description)
-
-  def changeset(model, params \\ %{}) do
-    model
-    |> cast(params, @required_fields, @optional_fields)
+  @fields ~w(name description)a
+  @required_fields ~w(name)a
+
+  def changeset(model, params \\ %{}) do
+    model
+    |> cast(params, @fields)
+    |> validate_required(@required_fields)
   end
 
 end


  end

  @required_fields ~w(name)
  @optional_fields ~w(description)

  def changeset(model, params \\ %{}) do
    model
    |> cast(params, @required_fields, @optional_fields)
  end
end


    timestamps()
  end

  @fields ~w(first_name last_name)a

  def changeset(model, params \\ %{}) do
    model
    |> cast(params, @fields)
    |> validate_required(@fields)
  end
end

