System.Utilities.Validation.IsValidZIP C# (CSharp) Method

IsValidZIP() public static method

Tests whether input string is a valid 5 or 9 digit ZIP Code. Expected format: #####, ##### ####, or #####-####.
public static IsValidZIP ( string ZIP ) : bool
ZIP string 5 or 9 digit ZIP code to test.
return bool
        public static bool IsValidZIP(string ZIP)
        {
            return MatchZIP.IsMatch(ZIP);
        }