Sitecore Content authorable error messages for form validation in MVC
I have created a form to get user input in Sitecore MVC application, it has different validation assigned like Required Field Validation Regex validation I have created a model for this Form objects and assigned the Out of the box.Net DataAnnotations Attributes along with the error message, but my business requested that these error messages need to be content authorable, but with this.Net out of the box we can’t achieve it, So I have created custom Attribute to manage these error messages from Sitecore. Before we dive in to create the custom attribute, it is necessary to have an item in Sitecore with all error messages for the fields that we going to use in the form, I have created an item with all necessary fields, but we can also go with Sitecore dictionary etc. Sitecore Item for error messages: So, let’s start creating the custom attributes to display content authorable error messages. · I’...