Skip to content

V15: Serverside Media Picker Validation#18429

Merged
nikolajlauridsen merged 15 commits intov15/devfrom
v15/feature/serverside-media-validation
Feb 25, 2025
Merged

V15: Serverside Media Picker Validation#18429
nikolajlauridsen merged 15 commits intov15/devfrom
v15/feature/serverside-media-validation

Conversation

@nikolajlauridsen
Copy link
Contributor

@nikolajlauridsen nikolajlauridsen commented Feb 24, 2025

Adds serverside validation for media picker, also adds a pattern to better support validation for JSON type property editors.

Testing

I've added unit tests, but to test manually:

  • Upload media
  • Create a document type with a media picker
  • Create content based on document type
  • Pick some media
  • Change media picker configuration to now make the picked media invalid
  • Publish - You should now see validation

This way you don't have to mess around with sending raw requests 😄

@nikolajlauridsen nikolajlauridsen marked this pull request as ready for review February 24, 2025 13:53
Copy link
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks an elegant solution to me. Will do a little manual testing but first leave my comments from reading over the code. Mostly nit-picks but see what you think about more efficiently handing multiple media selections and my comment on the test parameters.

Copy link
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test out fine locally as indicated. Approving with comments, so fine to merge once you have considered the points raised.

@nikolajlauridsen
Copy link
Contributor Author

Thanks for the review Andy, some good points 👍 I've applied all the points, and added some additional test 👍

@nikolajlauridsen nikolajlauridsen merged commit 74eb66e into v15/dev Feb 25, 2025
12 of 21 checks passed
@nikolajlauridsen nikolajlauridsen deleted the v15/feature/serverside-media-validation branch February 25, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants