I am using Sitecore 9 Forms with a default mandatory (required field) validation. While submitting the form it is showing some validation message.
Is it possible alter that message?
Sitecore Stack Exchange is a question and answer site for developers and end users of the Sitecore CMS and multichannel marketing software. It only takes a minute to sign up.
Sign up to join this communityI am using Sitecore 9 Forms with a default mandatory (required field) validation. While submitting the form it is showing some validation message.
Is it possible alter that message?
The code for the required field validation works in a different way than other validations and the message will come from the Sitecore dictionary. If you want to update or translate it, you need to add a key to that Dictionary.
This can be done in the master database - just add an item in the /system/Dictionary
- the name doesn't really matter. The key however needs to be exactly "{0} is required.". The phrase can be anything you want, just remember to add the {0} token as that will be replaced by your field name.
More info: https://ggullentops.blogspot.com/2017/10/sitecore-9-forms-translating-error.html
Note that the dictionary item does not exist in a default setup (a fallback is used in the code to give you a message when it is missing). So you actually need to create a new one.