From 114e25e7dbf456a7d5b1302076c422835bc83d72 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Wed, 1 Mar 2023 12:24:05 +0100 Subject: [PATCH] Release note for custom StreamField validation support (#7250) --- CHANGELOG.txt | 1 + docs/releases/5.0.md | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index fc529d753b..dc7aa7cdca 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ Changelog 5.0 (xx.xx.xxxx) - IN DEVELOPMENT ~~~~~~~~~~~~~~~~ + * Custom validation support for StreamField (Matt Westcott) * Add `WAGTAILIMAGES_EXTENSIONS` setting to restrict image uploads to specific file types (Aman Pandey, Ananjan-R) * Update user list column level to `Access level` to be easier to understand (Vallabh Tiwari) * Migrate `.button-longrunning` behaviour to a Stimulus controller with support for custom label element & duration (Loveth Omokaro) diff --git a/docs/releases/5.0.md b/docs/releases/5.0.md index e0c0a78d0d..c6cc6cc5a1 100644 --- a/docs/releases/5.0.md +++ b/docs/releases/5.0.md @@ -11,7 +11,9 @@ depth: 1 ## What's new -### ... +### Custom validation support for StreamField + +Support for adding custom validation logic to StreamField blocks has been formalised and simplified. For most purposes, raising a `ValidationError` from the block's `clean` method is now sufficient; more complex behaviours (such as attaching errors to a specific child block) are possible through block-specific subclasses of `ValidationError`. For more details, see [](streamfield_validation). This feature was developed by Matt Westcott. ### Other features