Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/validate method #119

Merged
merged 10 commits into from
Jul 28, 2022
Merged

Feat/validate method #119

merged 10 commits into from
Jul 28, 2022

Conversation

josdejong
Copy link
Owner

Fixes #56: implements a validate() method, and passes contentErrors via the onChange callback.

This introduces a breaking change: the third argument of the onChange callback, the signature was:

onChange(content: Content, previousContent: Content, patchResult: JSONPatchResult | null)

and is now:

onChange(content: Content, previousContent: Content, changeStatus: { contentErrors: ContentErrors, patchResult: JSONPatchResult | null })

@josdejong josdejong merged commit 705f5f2 into main Jul 28, 2022
@josdejong josdejong deleted the feat/validate_method branch July 28, 2022 11:47
josdejong added a commit that referenced this pull request Jul 28, 2022
…ixes #56 (#119)

BREAKING CHANGE:

The signature of `onChange` is changed from `onChange(updatedContent, previousContent, patchResult)`
to `onChange(updatedContent, previousContent, { contentErrors, patchResult })`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement an onValidation callback
1 participant