Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Property validation and httpErrors

Vote:
 

Hi,

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?

#114657
Dec 17, 2014 12:58
Vote:
 

I still did't found a solution.

#116979
Feb 09, 2015 13:40
Vote:
 

Hi!

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.

Regards
Linus Ekström
EPiServer Development Team

#117044
Feb 10, 2015 16:04
Vote:
 

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.

#117049
Feb 10, 2015 18:20
Vote:
 

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.

#140257
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.