Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Wrong custom validator error

Vote:
 

Hello,

I'm facing a weird issue here. I have a page that contains some properties with the [Required] attribute and some other properties that are validated using a custom validator.

I tried to create the page filling only the [Required] props. Next, I tried to publish it without filling the properties validated by my custom validator (three props). I have only one error instead of three (checked the code, my list contains three errors). Seems like the last error added to list is displayed. If I try to fill one of the props, on focus out, the validation process is ran again and the correct amount of errors are shown. After this point, the list of errors displayed is fine. 

Can someone please confirm me this in an EpiServer bug?

#201393
Feb 18, 2019 11:14
Vote:
 

Fixed it with the help of episerver support:

Each different error message should have a different property name.

This is an example for the bad code:

This is an example for the good code:

#202989
Apr 05, 2019 9:51
* 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.