Powershell Input Validation

https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Input-Validation-30ebaa51

Function Validate-PostalCode
{
Param([Parameter(Mandatory=$true,HelpMessage="Enter a valid Postal Code xxx-xxx-xxxx")][ValidatePattern("[0-9][0-9][0-9][0-9]")]$PostalCode)
Write-host "The Pin Code $PostalCode is valid"
}

Function validate-PhoneNumber
{
Param([ValidatePattern("\d{3}-\d{3}-\d{4}")]$phoneNumber)
Write-host "The phone number $phoneNumber is valid"
}


validate-PhoneNumber -Phonenumber 999-999-9999

function Validate-Email ([string]$Email)
{
return $Email -match "^(?("")("".+?""@)|(([0-9a-zA-Z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-zA-Z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,6}))$"
}

function Validate-IPAddress ([string]$IP)
{
if($IP -match "(\d{1,3}).(\d{1,3}).(\d{1,3}).(\d{1,3})" -and -not ([int[]]$matches[1..4] -gt 255))
{
Write-host "The $IP IP is valid"
}
}

function Validate-Filename
{
Param([ValidatePattern("^\d{8}_[a-zA-Z]{3,4}_[a-zA-Z]{1}\.jpg"]$filename)
Write-host "The filename $filename is valid"
}