Validation is used in multiple roles

If the same validation method is used in all roles, ValidateSets will include all options and ValidatePatterns will include all patterns with a regexOR:

$capA = @{VisibleCmdlets = 'Get-Process'; Parameters = @{Name = 'Name'; ValidateSet='A','B'}}
$capB = @{VisibleCmdlets = 'Get-Process'; Parameters = @{Name = 'Name'; ValidateSet='C'}}
$merge = @{VisibleCmdlets = 'Get-Process'; Parameters = @{Name = 'Name'; ValidateSet='A','B''C'}}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset