Expand my Community achievements bar.

SOLVED

How to customize the error message for required field in touch Ui in AEM

Avatar

Level 4

I know we can make use of required boolean property to make the field as required. If you dont enter any field in dialog, aem gives "Please fill out this field." as per the default implementation. Can we change this error message with any property?

 

I referred this API link - https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/reference-materials/granite-ui... but this does not have any relevant  property to customize error message. Can anyone tried to change this default error msg?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Unfortunately, there is no property/option to set custom messages or use regex like the classic UI widget.

for the same reason, I also end up creating a custom solution https://aemlab.blogspot.com/2019/05/aem-touch-ui-component-dialog-field.html

 

If you want to change a message you can simply generic solution to overwrite the OOTB message with a custom message. you can use coral alert api combination with custom error message property https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/coral-ui/c...

 

 



Arun Patidar

View solution in original post

7 Replies

Avatar

Level 4
What you are mentioning it custom validation. I dont want to do any custom validation. just want to make it as required field. The OOTB required proper will do the job but just want to change the default error message to something else.

Avatar

Level 4
And I knew this can be done in foundation validation but just to change the error message I dont want to go custom validation.

Avatar

Community Advisor

Hi @Anderson_Hamer,

 

You need to override the message and display it as per your requirement. You can ignore the custom validation in the url.

 

Thanks,

Kiran Vedantam.

Avatar

Level 4
Thank you KiranVedantam for your response. yeah, How do I override? Is there any prop to set ? or I should overlay/override the OOTB behaviour ?

Avatar

Correct answer by
Community Advisor

Hi,

Unfortunately, there is no property/option to set custom messages or use regex like the classic UI widget.

for the same reason, I also end up creating a custom solution https://aemlab.blogspot.com/2019/05/aem-touch-ui-component-dialog-field.html

 

If you want to change a message you can simply generic solution to overwrite the OOTB message with a custom message. you can use coral alert api combination with custom error message property https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/coral-ui/c...

 

 



Arun Patidar

Avatar

Level 1

A.M.E. is not for the spanish?.