Did $EventData in UDSelect change in 2026.3.0.0?
I am seeing the same thing, but with New-UDTextbox, in 2026.3.0 and 2026.3.1. Here is an example:
New-UDTextbox -Id "value" -Label "Enter Value" -OnValidate {
If ($EventData.length -eq 0) {
New-UDValidationResult -ValidationError "Value is required."
} Elseif (-not ($EventData -match "^[-A-Za-z0-9.]+$")) {
New-UDValidationResult -ValidationError "Only alphanumeric characters, dot (.) and hyphen (-) are allowed."
} Else {
New-UDValidationResult -Valid
}
}
This works correctly in 2026.2.4. If you leave the UDTextbox blank in 2026.2.4, and tab out of it, then $EventData.length is 0 and you see the correct validation error: "Value is required." But in 2026.3.x, in the same situation, $EventData is set to "" (two double quotes), so $EventData.length is 2 and the check fails when it should succeed. If you enter any other value in the UDTextbox and tab out of it in 2026.3.x, $EventData is surrounded by double quotes, and the match always fails even in cases where it should succeed, because the regex does not include quotes (and it shouldn't, because I don't want to allow quotes). In 2026.2.4, $EventData is not surrounded by double quotes, and the match statement works correctly.
New-UDAutocomplete -Multiple allows selecting same item more than once
Ruben: The original examples work exactly the same in 2026.2.3 as they did in 5.6.7. If you select the same menu options as the ones shown in the screenshot I included, it still looks the same with the new version of PSU.
I am using static -Options, not dynamic -OnLoadOptions.
Here is another example (simplified for this post) that I am using to allow IT staff to select Active Directory groups:
New-UDAutocomplete -Multiple -Options {
(Get-ADGroup -Server $dc -Credential $cred -LDAPFilter '(name=*)' -SearchBase $searchbase -Properties CanonicalName) | Foreach-Object {
New-UDAutocompleteOption -Name $_.CanonicalName -Value $_.Name
}
}
This allows users to choose the same items multiple times, which it should not. Other than that, it works correctly.
New-UDAutocomplete -Multiple allows selecting same item more than once
New-UDAutocomplete components with the -Multiple parameter allow individual options to be selected more than once. I previously opened an issue, with examples to reproduce the bug, here:
https://github.com/ironmansoftware/powershell-universal/issues/5241
That was for version 5.6.7, but the bug still exists in 2026.2.3.
Can this be fixed? Otherwise, is there a workaround?