From 41b6313897303efeaaa0a728f7ad53f9db970a69 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 19:53:01 +0000 Subject: [PATCH 1/2] Initial plan From 58099d61031d82ff7d3c53e6ebfaec17d7f8b59d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 19:55:50 +0000 Subject: [PATCH 2/2] Document removal of jQuery namespaced events in README migration guide Agent-Logs-Url: https://github.com/DavyJonesLocker/client_side_validations/sessions/76c443a3-308f-434b-97ab-b2aad84a0a72 Co-authored-by: tagliala <556268+tagliala@users.noreply.github.com> --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index fea72b22..1c397bba 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,28 @@ rails g client_side_validations:copy_assets Note: If you run `copy_assets`, you will need to run it again each time you update this project. +## Migration Guide ## + +### 24.x Breaking Changes ### + +**jQuery namespaced events are removed.** Events are now plain native DOM custom events. If your application listens to or unbinds events using jQuery-style namespacing, you must update those calls. + +Before: + +```js +$(form).on('form:validate:before.ClientSideValidations', handler) +$(input).off('.ClientSideValidations') +``` + +After: + +```js +form.addEventListener('form:validate:before', handler) +// store and pass the handler reference to removeEventListener when unbinding +``` + +The full list of native events dispatched by ClientSideValidations: `form:validate:before`, `form:validate:after`, `form:validate:pass`, `form:validate:fail`, `element:validate:before`, `element:validate:after`, `element:validate:pass`, `element:validate:fail`. + ## Initializer ## The initializer includes a commented out `ActionView::Base.field_error_proc`.