Posted: 8 May 2019 10:34 EDT Last activity: 24 May 2019 8:02 EDT
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?
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.
I don't see anything applicable in the link other than what it suggests for phone numbers which I am already using.
We've created our own edit inputs and edit validates that are much more flexible than what's offered out of the box but the problem there is that this is a reusable property from the framework and we don't want to limit reusability by including edit inputs or edit validates. Is there any control that allows you to specify an edit input and edit validate?
Yes, It is recommended to compose edit input or validate rules as per the application requirement.
I get the problem with reusable property. It is standard that phone number property always reused to collect the phone number or display the phone number, so configuring the property with own edit validate and input rules is the best choice and that does not stop reusability.
There is no way you can configure a control with edit input or edit validate rules. However, the same functionality (what edit validate and edit input are doing )can be achieved using data transforms or activities and validate rules configuring them as actions in the actions tab of control configuration wizard (cell properties panel).
No, the pxPhone control does nothing to the input and there is no way to directly use an edit input or edit validate with a control other than maybe creating a custom control. An alternative is to use onChange actions on the field to modify the value.