Closed DennisL68 closed 1 year ago
Hi @DennisL68 - Thank you for the issue. This is supported today with PowerShell advanced functions validate attributes. https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_functions_advanced_parameters?view=powershell-7.3#validatecount-validation-attribute
Yes, I am aware of the Advanced functions feature.
But can it be added to the JSON-configuration? It seems to be a very good improvement for Crescendo.
These are supported today in the json as well -- Check out our samples folder https://github.com/PowerShell/Crescendo/tree/master/Microsoft.PowerShell.Crescendo/Samples and additional docs here: https://learn.microsoft.com/en-us/powershell/utility-modules/crescendo/get-started/create-new-cmdlet?view=ps-modules
Summary of the new feature / enhancement
As a PowerShell scripter I often like to validate the parameter input from the user to avoid running commands with parameters that eventually would fail anyway
Proposed technical implementation details (optional)
Add options to parameters for validations normally supported on input parameters in PowerShell