Question
4
Replies
319
Views
Posted: May 8, 2019
Last activity: May 24, 2019
Closed
Solved
pxPhone control field allowing all characters
I'm using the pxPhone control but it doesn't seem to be doing anything for phone numbers. It's accepting all characters and any length and never applying any masking/formatting. It is set to Phone type. Tried in Chrome, Edge, and IE. Currently on Pega 7.3. Isn't the pxPhone control supposed to restrict the allowed characters and mask it on blur?
Hi Hermy,
The pxPhone control does not mask or it does not restrict the user to enter only number. This is a similar control to text input. Please go through following help document link.
https://community.pega.com/sites/default/files/help_v73/procomhelpmain.htm#designer%20studio/data%20designer/data-designer-dt-field-types-and-controls-ref.htm
The pxPhone control is similar to text input control. However, the different of these two control comes when using them. The pxPhone control is meant for mobile phone. when user is using pega in their mobile, they can directly dial in the number upon clicking the value of pxPhone control in case of text input, they will miss that feature.
Coming to point, how to restrict the user not to enter characters or formating the value in pxPhone control to resemble like a telephone number, There are certain OOTB validations and formats provided. You can use them for your requirement or you can make similar copy as per the need.
Go to the advanced tab of the property referred in phone control and use the edit input and use validate fields.
Like "ValidPhoneNumber" you can find "USPhone", formatting phone input value with "-" and so on.
Please feel free to comment for further clarifications and queries.
Thank you,
Regards, Tilak