-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback about form-validation
#9
Comments
Hi @elixirdive ! I've run the exact same code from the website and from https://github.com/adopt-liveview/adopt-liveview/blob/main/priv/examples/form-validation/form_with_core_components.exs (they're the same) and seems to work Can you paste your current code and the full error message so we can look at it together 🕵️? |
form_with_core_components.exs defmodule PageLive do @initial_state %{ def mount(_params, _session, socket) do def handle_event("validate_product", %{"product" => product_params}, socket) do
end def handle_event("create_product", %{"product" => product_params}, socket) do def render(assigns) do <.form for={@Form} phx-change="validate_product" phx-submit="create_product" class="flex flex-col max-w-96 mx-auto bg-gray-100 p-24" > Creating a product<.input field={@Form[:name]} placeholder="Name" /> <.input field={@Form[:description]} placeholder="Description" />
end LiveviewPlayground.start(scripts: ["https://cdn.tailwindcss.com?plugins=forms"]) Error message: 09:45:28.514 [error] GenServer #PID<0.371.0> terminating
|
form_with_core_components.exs throws an (ArgumentError) *2nd argument: not a tuple.
I put time trying to figure out the solution for this, I cant seem to come up with a solution.
Please help
The text was updated successfully, but these errors were encountered: