We're using the Form core components in AEM 6.5
The form text however does not behave as expected. After adding Required Message :
It should show the message as mentionned in a tooltip. Instead, we're getting what seems to be a generic message in the language of the site:
There is also a slight difference in the wording of the message depending on the browser used.
Same issue with Constraint Message.
Is this behavior normal? Did we miss a configuration somewhere?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi,
It should not show the default message, the authored message should be shown but somehow something is broken and custom/Authored message is not visiable.
Hi,
What are you seeing is the browser's validation message.
you can check the https://github.com/adobe/aem-core-wcm-components/tree/main/content/src/content/jcr_root/apps/core/wc...
The custom validation message https://github.com/adobe/aem-core-wcm-components/blob/b4327c3fedf2ade81cb52b6dccadad18cb780c8d/conte... is shown using javascript https://github.com/adobe/aem-core-wcm-components/blob/b4327c3fedf2ade81cb52b6dccadad18cb780c8d/conte...
Hello @arunpatidar
The message shown is "Veuillez remplir ce champ" which means "Please fill in this field" in French, the language of the site the component is used in. This message could potentially work as it is logical and makes sense for the validation, but it is not the message that was authored. It seems we do not have access to customize validation messages and the component defaults to browser to handle content of the message (like I said, the wording of the required message varies slightly from browser to another, but ultimately have same meaning, i.e the field needs to be filled in)
Is this behavior normal, even though the documentation specifies otherwise?
We're considering overriding the form components and changing the javascript.
Hi,
It should not show the default message, the authored message should be shown but somehow something is broken and custom/Authored message is not visiable.
@marissi Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes