episerver / episerver-labs-content-manager-docs

Documentation for EPiServer.Labs.ContentManager
1 stars 0 forks source link

Block is removed from content area if you have validation errors on IList properties #20

Open simenepinova opened 3 years ago

simenepinova commented 3 years ago

When we attempt to save a new a block directly from a content area and validation inside the block triggers and fails we get a popup message alerting of the validation errors. When we close the validation popup the block is deleted and all items added are lost.

In our case we have an image carousel block with a custom validation attribute on an IList property to ensure atleast x images are added. When we close the validation message popu-up the block is deleted along with all the items added prior to validation failed. We get the same behaviour with other blocks that has validation on IList properties.