Clarify hx-validate documentation (#2221)

This commit is contained in:
MikeMoolenaar 2024-01-22 01:33:36 +01:00 committed by GitHub
parent f37191063c
commit 94ca5f5a36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,7 @@ title = "hx-validate"
The `hx-validate` attribute will cause an element to validate itself by way of the [HTML5 Validation API](@/docs.md#validation)
before it submits a request.
Form elements do this by default, but other elements do not.
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.
## Notes