fix: avoid quick event empty name

This commit is contained in:
Alex Lion
2025-07-07 23:16:22 +02:00
parent 9c1c3d01c1
commit afb989485e
2 changed files with 2 additions and 1 deletions

View File

@@ -6,6 +6,7 @@
- Upgrade Elixir dependencies, including Phoenix Live View to 1.0.17
- Upgrade to Tailwind 4+
- Refactor view templates to use {} instead of <%= %>
- Fix event name validation to be required
### v.2.3.2

View File

@@ -57,7 +57,7 @@ defmodule Claper.Events.Event do
|> cast(attrs, [:name, :code, :user_id, :started_at, :expired_at])
|> cast_assoc(:presentation_file)
|> cast_assoc(:leaders)
|> validate_required([:code, :started_at])
|> validate_required([:name, :code, :started_at])
|> validate_length(:code, min: 5, max: 10)
|> validate_length(:name, min: 5, max: 50)
|> downcase_code