adopt-liveview / adopt-liveview/feedback

Feedback about `form-validation`

Abierto
#12 0 comentarios 0 reacciones 0 asignados Ver en GitHub
v2
Lenguaje dominante
Sin datos de lenguaje
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

The view is crashing after entering the first letter in name :
10:07:42.679 [debug] HANDLE EVENT "validate_product" in PageLive
Parameters: %{"_target" => ["product", "name"], "product" => %{"description" => "", "name" => "a"}}

10:07:42.679 [debug] Replied in 204µs

10:07:42.679 [error] GenServer #PID<0.2407.0> terminating
** (ArgumentError) errors were found at the given arguments:

* 2nd argument: not a tuple

:erlang.element(1, "cannot be empty")
(liveview_playground 0.1.8) lib/liveview_playgroud/core_components.ex:298: anonymous fn/1 in LiveviewPlaygroundWeb.CoreComponents."input (overridable 1)"/1
(elixir 1.17.0) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
(liveview_playground 0.1.8) lib/liveview_playgroud/core_components.ex:298: LiveviewPlaygroundWeb.CoreComponents."input (overridable 1)"/1
(phoenix_live_view 0.20.14) lib/phoenix_live_view/tag_engine.ex:92: Phoenix.LiveView.TagEngine.component/3
form.exs:56: anonymous fn/2 in PageLive.render/1
(phoenix_live_view 0.20.14) lib/phoenix_live_view/diff.ex:368: Phoenix.LiveView.Diff.traverse/7
(phoenix_live_view 0.20.14) lib/phoenix_live_view/diff.ex:546: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/7
Last message: %Phoenix.Socket.Message{topic: "lv:phx-F9m449ENCYC3Xp0D", event: "event", payload: %{"event" => "validate_product", "type" => "form", "uploads" => %{}, "value" => "product%5Bname%5D=a&product%5Bdescription%5D=&_target=product%5Bname%5D"}, ref: "11", join_ref: "9"}
State: %{socket: #Phoenix.LiveView.Socket, router: LiveviewPlayground.Router, assigns: %{form: %Phoenix.HTML.Form{source: %{"description" => "", "name" => ""}, impl: Phoenix.HTML.FormData.Map, id: "product", name: "product", data: %{}, action: nil, hidden: [], params: %{"description" => "", "name" => ""}, errors: [], options: [], index: nil}, flash: %{}, __changed__: %{}, live_action: :index}, transport_pid: #PID<0.2403.0>, ...>, components: {%{}, %{}, 1}, topic: "lv:phx-F9m449ENCYC3Xp0D", serializer: Phoenix.Socket.V2.JSONSerializer, join_ref: "9", upload_pids: %{}, upload_names: %{}}

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.