FEATURE: Add notEmpty validation for asset metadata fields and improve UI feedback#20
Merged
FEATURE: Add notEmpty validation for asset metadata fields and improve UI feedback#20
Conversation
…back for required fields
Member
|
I ran straight into this when creating a new content with enabled validation: to reproduce: create content that has an image with enabled validation, select content that has no image selected yet |
Member
|
Works fine now in general. I suggest to
|
Collaborator
Author
Added Translations to the Package Translation Package name: New Translations: |
a455820 to
1d712cd
Compare
mficzel
approved these changes
Jan 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds validation for the title and alt fields per image in both the
single editorand thecollection editor.To enable validation, add a
validationconfiguration with thenotEmptyrule and specify the fields to validate(e.g. alt, title). This ensures that the UI correctly reflects the validation state for users in both editor variants.To prevent users from applying an invalid configuration, a corresponding server-side validator must also be provided. The validator
Sitegeist.Kaleidoscope.ValueObjects/Validators/NotEmptymirrors the structure of the validation configuration defined ineditorOptions, ensuring consistent validation behavior between the UI and backend.image: ui: inspector: editorOptions: crop: aspectRatio: forceCrop: true locked: width: 4 height: 3 validation: notEmpty: alt: true title: true validation: 'Sitegeist.Kaleidoscope.ValueObjects/Validators/NotEmpty': alt: true title: true