I am trying to pass a list of error messages to CancelReason property of ConventEvent class, and display each message in its own
Anyone has a solution for this?
Implement multiple validators? :)
Thanks for your reply.
How multiple validators could be used to fix this problem? The CancelReason only accepts a string value
Can you provide a code sample?
You could consider considering implementing an IValidator<T> interface rather than use the content events. This allows you to return a collection of messages. See http://www.david-tec.com/2012/06/EPiServer-7-Preview---IValidator-interface/
I meant using validators like David also suggested. How many depends on your view on single responsibility principle :)
Haven't tried to use multiple validators myself on the same content type though. My validation is pretty small so no need to split it up. But in theory you could validate vs an interface like IHasSeoInformation or similar.