mirror of
https://github.com/ClaperCo/Claper.git
synced 2026-02-24 04:01:04 +01:00
fix: avoid quick event empty name
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user