ValidateEnumeratedArgumentsAttribute
Classes that inherit from ValidateEnumeratedArgumentsAttribute may be used to test each of the elements in an array (when associated with an array-based parameter), or a single item (when associated with a scalar parameter).
Classes that implement ValidateEnumeratedArgumentsAttribute must inherit from System.Management.Automation.ValidateEnumeratedArgumentsAttribute. The class must implement a Validate method that is marked as abstract in the ValidateEnumeratedArgumentsAttribute class.
The ValidateElement method accepts one argument with the System.Object type. This is shown in the .NET reference: https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.validateenumeratedargumentsattribute.validateelement?view=powershellsdk-1.1.0 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access