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!

Form element is not published because of the validator's error message



We are using .NET Framework 4.7.2., EPiServer CMS 11, EPiServer.Forms.Core 4.30.4 NuGet package, EPiServer.Forms.UI 4.30.4 NuGet package. 


Error message in the validators, which are added to the forms element (for example the Text block) are preventing the element from being published properly (the Error message of validator is not saved correctly, which causes the problems with publishing block).  
When any validator which is derived from the ElementValidatorBase class (EPiServer.Forms.Core.Validation namespace) is ticked in the forms element block, the publishing is not completing successfully. Looks like the Error message cannot be saved and read properly, which causes unpredictable behaviour. 
Additionally, if you untick all the validators of the form element, the problem will disappear. If you don't add any value to the Error message, it will still cause the same problem. 

1.A validator is added to the element and field of the validator is edited, element is published (look like everything works fine):

2.After we quit the page in the CMS (for example we press F5 and update the page): “Publish changes” appears again, when no changes were done to form element and Error messages are reset to default. Every time you access the element once again, it will keep resetting the Error message to default state and element will be marked as 'to publish'. 


If anybody has any ideas what this issue could be related to, I would appreciate it very much. 

Thanks in advance. 

Aug 16, 2022 15:03
* 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.