diff --git a/app/views/posts/_htmx_form.haml b/app/views/posts/_htmx_form.haml index f4f4a845..7a23445b 100644 --- a/app/views/posts/_htmx_form.haml +++ b/app/views/posts/_htmx_form.haml @@ -27,7 +27,12 @@ multipart: true, class: 'form post ', 'hx-swap': params.require(:swap), - 'hx-target': "##{params.require(:target)}" + 'hx-target': "##{params.require(:target)}", + 'hx-validate': true, + data: { + controller: 'form-validation', + action: 'form-validation#submit' + } } if post.new?