silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
721 stars 821 forks source link

ENH allow stacked messages on FormMessage #10966

Closed andrewandante closed 1 year ago

andrewandante commented 1 year ago

Fixes #10270

Adds a new method: FormMessage::appendMessage() which attempts to stack messages if it can, falling back to the current behaviour of setting the message if there's a mismatch.

image
GuySartorelli commented 1 year ago

Also FYI this has prompted me to make this issue for CMS 6

andrewandante commented 1 year ago

Also FYI this has prompted me to make this issue for CMS 6

Hah yes that was definitely coming, I was reluctant to turn this into an API-breaking change but I think that would definitely be the best long-term approach.

andrewandante commented 1 year ago

Think I've managed to get my conditions in the right order now 😅

GuySartorelli commented 1 year ago

This will be included in the Silverstripe CMS 5.2.0 release.