Data validation showFieldMsg not working in Service Portal


Data validation not working in Service Portal since New York upgrade.

Steps to Reproduce

1. Create a Single Line Text variable for a catalog item.

2. Create a catalog client script:
UI Type: All
Type: onChange
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
g_form.showFieldMsg("test","Please enter a valid Email Address","error", false);

3. Navigate to the catalog item in Service Portal.

4. Enter something in the field. The message "Please enter a valid Email Address" is not displayed.


This is expected behaviour. By design g_form.clearValue hides existing field messages in Desktop UI forms, Service Portal forms, and Service Portal catalog items, but not in Desktop UI catalog items.

The workaround is to use clearValue before showFieldMsg if you want the message to persist.

Related Problem: PRB1368617