Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down