Skip to content

clarify hx-validate documentation #2185

@mvolkmann

Description

@mvolkmann

Currently https://htmx.org/attributes/hx-validate/ says "Form elements do this by default, but other elements do not." Some people interpret "form elements" to mean input, textarea, and select elements. But here "Form elements" only refers to actual form elements. I recommend changing that line to the following.

<form> elements do this by default, but the form control elements <input>, <textarea>, and <select> do not.
When hx-validate="true" is added to form control elements that are configured to send their own HTTP requests, the form control value will be validated before the request is sent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions