Skip to content

Commit 6615ad6

Browse files
committed
Update readme and changelog
1 parent 620b88c commit 6615ad6

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
* [FEATURE] Breaking change: Remove the jQuery runtime dependency and the old jQuery plugin aliases from the published JavaScript assets
6+
* [FEATURE] Breaking change: Public JavaScript APIs now work with native DOM elements and DOM collections instead of jQuery-wrapped objects
7+
* [ENHANCEMENT] Use native browser events and event listeners throughout the runtime and test harness
8+
39
## 23.1.0 / 2026-01-27
410

511
* [FEATURE] Add jQuery 4.0.0 compatibility

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,30 @@ rails g client_side_validations:copy_assets
108108

109109
Note: If you run `copy_assets`, you will need to run it again each time you update this project.
110110

111+
## Migration Guide ##
112+
113+
### Removing jQuery Dependency ###
114+
115+
If you are upgrading from the older jQuery-based API, update your integration code to use the `ClientSideValidations` object directly.
116+
117+
The old jQuery plugin methods are removed. Use the DOM-first public API instead:
118+
119+
```js
120+
ClientSideValidations.enable(form)
121+
ClientSideValidations.validate(form)
122+
ClientSideValidations.isValid(form, validators)
123+
ClientSideValidations.disable(form)
124+
ClientSideValidations.reset(form)
125+
```
126+
127+
These methods accept native DOM elements and DOM collections. They do not accept jQuery objects or CSS selector strings.
128+
129+
Custom validators, form builders, and callbacks now receive native DOM nodes instead of jQuery wrappers. Update any custom code to use DOM APIs such as `.value`, `.form`, `.closest()`, and `querySelector()`.
130+
131+
If you are upgrading from a version older than 23.0.0, update any custom selectors or custom code that still reads `data-changed`, `data-valid`, or `data-validate` to use `data-csv-changed`, `data-csv-valid`, and `data-csv-validate` instead.
132+
133+
If your application vendors the compiled asset with `rails g client_side_validations:copy_assets`, run that generator again after upgrading so your copied asset matches the current jQuery-free bundle.
134+
111135
## Initializer ##
112136

113137
The initializer includes a commented out `ActionView::Base.field_error_proc`.

0 commit comments

Comments
 (0)