Hello everyone,
I am trying to add field level notification to my crm contact form, so i wanted to be type INFO but it keeps showing an error message.
here's the code:
var pattern = /^((00)[0-9]{12})?(^[+][0-9]{12})?$/gm;
var fieldName = 'mobilephone';
var currentValue = formContext.getAttribute(fieldName).getValue();
if (pattern.test(currentValue)) {
formContext.getControl(fieldName).setNotification("Number is not in the right format", "INFO" ,"2");
} else {
formContext.getControl(fieldName).clearNotification("2");
}

Appreciate your help!