Remove phone number pattern in User Management - Forum - OpenEdge BPM - Progress Community

Remove phone number pattern in User Management

 Forum

Remove phone number pattern in User Management

This question is answered

One of my customers has all his phone number in a ########## format in the user management database. Everytime he wants to change data on the user management screen, an error pops up that the format should be ###-###-####. This doesn't make sense for Dutch phonenumbers. Is there a way to remove this validation? It seems to be hardcoded at the moment.

Besides that, it seems to only do so in Internet Explorer, in Chrome on page load I get a log in the console saying "Uncaught ReferenceError: checkUpdate is not defined", so when saving, the data (including the admin password!) is never checked.

Perhaps this/both issues have been fixed in updates, currently we're using 11.4 (build #1294)...

Verified Answer
  • Hi Tom,

    We observed that there are two issues.

    Issue - 1: The phone number format is hard coded, which is applicable in latest versions (11.7) as well. I will create an enhancement in our backlog to make the format configurable.

    However, I'd like to suggest a temporary workaround which can help the customer get going.

    The phone number can be edited in two scenarios. 1. When adding a new user, 2. Editing the details of existing user.

    Locate the string var rx = new RegExp(/^\d{3}\-\d{3}\-\d{4}$/); in the files user_add.jsp & user_det.jsp which are located under <DLC>\oebpm\jboss\webapps\deploy\sbm.war\bpmportal\administration and chnage the regular expression to a format that works for you.

    Example: If customer doesn't require the validation with hipen(-) characters, you can make it optional with the below regular expression.

    var rx = new RegExp(/^\d{3}\-?\d{3}\-?\d{4}$/); // Works for both  ########## & ###-###-####

    or you need to allow  just 10 digits without any extra symbols, use

    var rx = new RegExp(/^\d{10}$/); // Works only for ##########

    Additionally, you also need to change the validation message where the older format is shown.

    To do that, locate the file bpmportal.properties (bpmportal_<LANG_PREFIX>.properties for locale specific message) under <DLC>\oebpm\jboss\webapps\deploy\sbm.war\WEB-INF\classes\properties & change the property with the key EnterValidPhoneNoFormat as per your expected format.

    Restart Portal server to get your changes applied.

    Issue - 2: The error in console when opened in Chrome has been fixed in the later versions.

    Please confirm if it works for the customer.

All Replies
  • Hi Tom,

    We observed that there are two issues.

    Issue - 1: The phone number format is hard coded, which is applicable in latest versions (11.7) as well. I will create an enhancement in our backlog to make the format configurable.

    However, I'd like to suggest a temporary workaround which can help the customer get going.

    The phone number can be edited in two scenarios. 1. When adding a new user, 2. Editing the details of existing user.

    Locate the string var rx = new RegExp(/^\d{3}\-\d{3}\-\d{4}$/); in the files user_add.jsp & user_det.jsp which are located under <DLC>\oebpm\jboss\webapps\deploy\sbm.war\bpmportal\administration and chnage the regular expression to a format that works for you.

    Example: If customer doesn't require the validation with hipen(-) characters, you can make it optional with the below regular expression.

    var rx = new RegExp(/^\d{3}\-?\d{3}\-?\d{4}$/); // Works for both  ########## & ###-###-####

    or you need to allow  just 10 digits without any extra symbols, use

    var rx = new RegExp(/^\d{10}$/); // Works only for ##########

    Additionally, you also need to change the validation message where the older format is shown.

    To do that, locate the file bpmportal.properties (bpmportal_<LANG_PREFIX>.properties for locale specific message) under <DLC>\oebpm\jboss\webapps\deploy\sbm.war\WEB-INF\classes\properties & change the property with the key EnterValidPhoneNoFormat as per your expected format.

    Restart Portal server to get your changes applied.

    Issue - 2: The error in console when opened in Chrome has been fixed in the later versions.

    Please confirm if it works for the customer.

  • Thanks. I will see if I can get this consistently working at the customer.