Extra quote characters in parameter settings

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
ggreen
Posts: 8
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Fri Dec 29, 2017 3:32 pm

Extra quote characters in parameter settings

Post by ggreen »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 2020 5.7.175
32 or 64 bit version of product: 64
Operating system: Windows 10 1903
32 or 64 bit OS: 64

*** Please add details and screenshots as needed below. ***

DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM

I am working on a PS Module project and for one of my functions, I am utilizing the 'ValidatePattern' parameter validation. I selected the provided 'Internet e-mail address' regex pattern from within the function builder tool. When it is put in place it looks like the snippet below and seems to work just fine.

Code: Select all

[ValidatePattern('\w+([-+.'']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*')]
Whenever I subsequently use the function builder tool to modify something about that particular function (not necessarily that specific parameter) extra single quote characters get added to the 'ValidatePattern' regex values. The snippet below shows what the 'ValidatePattern' line looks like after using the function builder to edit the function one time after the 'ValidatePattern' value is reset to the expected value above.

Code: Select all

[ValidatePattern('\w+([-+.'''']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*')]
I have also observed similar behavior when single quotes are used in the help message attribute for parameters but have simply avoided using them for the parameter help message attribute.

Is there a formatting setting I should have configured a certain way or something else I should be doing that will prevent this behavior from occurring going forward?

Thanks,
Glen

User avatar
brittneyr
Site Admin
Posts: 428
Joined: Thu Jun 01, 2017 7:20 am

Re: Extra quote characters in parameter settings

Post by brittneyr »

We will look into this and get back to you soon!
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
brittneyr
Site Admin
Posts: 428
Joined: Thu Jun 01, 2017 7:20 am

Re: Extra quote characters in parameter settings

Post by brittneyr »

I've been able to reproduce this and have filed a bug report for the development team.
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
ggreen
Posts: 8
Joined: Fri Dec 29, 2017 3:32 pm

Re: Extra quote characters in parameter settings

Post by ggreen »

Fantastic. Thank you for the update. It's greatly appreciated!