Chapter4/4.6_AdvancedFunctions/4.6.6_Validattion/ValidateCountValidateLength.ps1

function Get-DirectorySize {
    [CmdletBinding()]
    param(
        [parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
        [Alias("Path", "PSPath")]
        [ValidateCount(1, 2)]
        [ValidateLength(2, 6)]
        [string[]]$LiteralPath,
  
        [parameter(ValueFromPipelineByPropertyName = $true)]
        [int]$OverSize
    )
}