Replies: 2 comments
-
Hey, you could just put something like this into the response:
Let me know if you have further questions. |
Beta Was this translation helpful? Give feedback.
-
Hi @josevelaz. I don't know if my answer is what you expect but I found a video on YT about form validation with templ and HTMX After watching it I wonder, what would be the best validation package for this task to not do it as in the video? There are some option:
I think you can use any of validator options and adapt it using video strategy. I'm not an expert of HTMX (nor HTML/JS/CSS/Life hahaha) but there should be a way to send "validation request" when form changes. A real problem I see from here is how to handle time values. HTML input datetime can receive a formatted time (2025-0517T13:20:30Z-07:00 I think this can be an example). And create a form with correct format between them seems to be hard. Other scenario that I have not checked is files handling too. Maybe consider create JS functionality for this two points would be a good conclusion form this discussion 😅 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I see that some components have a HasError props, but how would that get enabled through htmx?
Beta Was this translation helpful? Give feedback.
All reactions