diff --git a/lib/chore_tracker/chores/chore.ex b/lib/chore_tracker/chores/chore.ex index 5617dd0..f25ffba 100644 --- a/lib/chore_tracker/chores/chore.ex +++ b/lib/chore_tracker/chores/chore.ex @@ -35,7 +35,8 @@ defmodule ChoreTracker.Chores.Chore do :scheduled_at, :next_assignee_id ]) - |> validate_required([:name, :emoji, :period, :period_unit, :scheduled_at]) + |> validate_required([:name, :period, :period_unit, :scheduled_at]) |> validate_length(:emoji, min: 1, max: 1) + |> validate_number(:period, greater_than_or_equal_to: 1) end end diff --git a/lib/chore_tracker_web/live/chore_live/form_component.ex b/lib/chore_tracker_web/live/chore_live/form_component.ex index 890423b..0bffc02 100644 --- a/lib/chore_tracker_web/live/chore_live/form_component.ex +++ b/lib/chore_tracker_web/live/chore_live/form_component.ex @@ -28,7 +28,7 @@ defmodule ChoreTrackerWeb.ChoreLive.FormComponent do
Repeat every