Support Article

Radio button validation msg localized even if section is not

SA-36795

Summary



Operator locale is in Spanish or French.

There is a Radio button which has validation enabled "Required".

Though the section is not localized, if there is an error message for Radio button, then the message "Value cannot be blank" is displayed in Spanish, which should be displayed in English, as the section is not localized.



Error Messages



Not Applicable


Steps to Reproduce



1. Create a radio button with Required checked.
2. Include operator locale as Spanish(Mexico) [es-MX].
3. Go to section > HTML tab > Uncheck Localize (by default unchecked).
4. Install the Spanish language pack.
5. Run the use-case and submit without selecting any value of radio button. See the validation error message appearing in Spanish instead of English(as section is not localized).


Root Cause



Validation message is not dependent on the section, it is client side validation which is set at csvalid html fragment rule ( which does not know what section it is called, only information it has what field it is).

So the error message is localized based on the setting of locale. Localized message will pick up based on the locale set.

This is marked as Enhancement (FDBK-19195).

Resolution



Perform the following local-change:

Include a non-auto generated section and include it in the main section and override the variable required_requiredMsgStr with the required error message.


<script>
required_requiredMsgStr = "Value can not be blank";
</script>




Published April 20, 2017 - Updated May 9, 2017

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.