2026.3.1 - Can run script without all parameters being filled
In current version if you have a param with a ValidateSet and tab between fields and use keyboard to select the option from the drop down the job will be submitted when pressing enter to choose your selection.
Example Script:
param(
[ValidateSet( 'Test1', 'Test2' )]
[string] $Test
)
Reproducing:
Note that this does not affect [string[]] inputs with or without validate set.
IMO, the Enter key should NEVER launch the script. There is a chance the script can be run with incomplete parameters and cause major issues.
Additionally, selecting the option from the drop down with the mouse seems to lock up any remaining string options with a ValidateSet decorator.
Hello @realslacker
Thank you for the detailed report and reproduction steps.
We are going to test this behavior internally on 2026.3.1, focusing on the Enter key behavior with ValidateSet parameters and comparing keyboard versus mouse selection. We will also check the difference between [string] and [string[]] parameters and verify how the form behaves when additional or mandatory parameters are present.
We will update the thread once we have completed the reproduction tests.
Best regards,
Ruben Tapia
Hello @realslacker
Thank you again for the detailed reproduction steps.
We completed our internal testing and were able to reproduce the main keyboard behavior you reported.
With a scalar [string] ValidateSet parameter, using the arrow keys to highlight an option and then pressing Enter can cause the script to start before the selected value is committed. In our testing, this resulted in the job starting with the optional parameter value empty.
We observed the same behavior in PSU 2026.3.1, 2026.3.0, and 2026.2.5, so our current evidence does not indicate that this was introduced specifically in 2026.3.1.
We also confirmed that Mandatory parameters prevented the incomplete form from being submitted. We were not able to reproduce the reported issue where mouse selection prevents interaction with subsequent ValidateSet fields.
As a temporary workaround, selecting the ValidateSet option with the mouse and then using the explicit Run button worked correctly in our testing.
Based on these findings, we are proceeding with an internal escalation to Development for review.
Best regards,
Ruben Tapia