hx-validate
Validates before submitting request
The hx-validate attribute will cause an element to validate itself by way of the HTML5 Validation API before it submits a request.
Syntax
<input hx-post="/submit" hx-validate="true">
Only <form> elements validate data by default, but other elements do not. Adding hx-validate="true" to <input>, <textarea> or <select> enables validation before sending requests.
Licensed under the Zero-Clause BSD License.
https://four.htmx.org/reference/attributes/hx-validate/