Try our conversational search powered by Generative AI!

Property validation and httpErrors



I have "public class RequiredImageSizeValidator : IValidate" and it's worked good.

But if I add


validation working incorrectly.

If validator return errors, create button becomes disabled, but error not showing.

Server response with httperrors in config

 Server response without httperrors in config

How I can remove effect from httperrors in validation?

Dec 17, 2014 12:58

I still did't found a solution.

Feb 09, 2015 13:40


I've reported the following bug for this: Bug #122692: Generating a server side validation for content does not display the validation messages on the server.

Linus Ekström
EPiServer Development Team

Feb 10, 2015 16:04

This is expected but perhaps a bit surprising. The response payload containing the error messages is json-formatted, but when the errorHandler is configured to replace the response the error messages will be replaced.

Setting existingResponse="Auto" should solve your problem. 

This is not specific to your custom validation. We're using the TrySkipIisCustomErrors flag on the response to be able to return computer friendly REST responses, so you will experience similar problems for all store responses returning a payload in the body.

Here's an explanation of the TrySkipIisCustomErrors flag.

Feb 10, 2015 18:20

Does anyone actually have a working solution to this? Setting existingResponse to Auto does fix the validation issue, but with it in place I am unable to get any custom errors to work.

Oct 14, 2015 12:10
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.