C# Class System.Utilities.Validation

Provides several functions for validating various inputs.
Datei anzeigen Open project: ellipticbit/systemutilities

Public Methods

Method Description
IsAlphaNumeric ( String stringToCheck ) : bool

Tests whether input string contains valid alpha-numeric characters.

IsNumeric ( String stringToCheck ) : bool

Tests whether input string contains valid numeric characters.

IsValidEmailAddress ( string EmailAddress ) : bool

Tests whether input string is a valid email address.

IsValidFileName ( string FileName ) : bool

Tests whether input string is a valid phone number.

IsValidHTTPURI ( string HTTPURI ) : bool

Tests whether input string is a valid phone number.

IsValidIPv4 ( string IPv4 ) : bool

Tests whether input string is a valid phone number.

IsValidIPv6 ( string IPv6 ) : bool

Tests whether input string is a valid phone number.

IsValidPhoneNumber ( string PhoneNumber ) : bool

Tests whether input string is a valid phone number.

IsValidZIP ( string ZIP ) : bool

Tests whether input string is a valid 5 or 9 digit ZIP Code. Expected format: #####, ##### ####, or #####-####.

IsValidZIP5 ( string ZIP5 ) : bool

Tests whether input string is a valid 5 digit ZIP Code.

Private Methods

Method Description
Validation ( ) : System.Text.RegularExpressions

Method Details

IsAlphaNumeric() public static method

Tests whether input string contains valid alpha-numeric characters.
public static IsAlphaNumeric ( String stringToCheck ) : bool
stringToCheck String String to test.
return bool

IsNumeric() public static method

Tests whether input string contains valid numeric characters.
public static IsNumeric ( String stringToCheck ) : bool
stringToCheck String String to test.
return bool

IsValidEmailAddress() public static method

Tests whether input string is a valid email address.
public static IsValidEmailAddress ( string EmailAddress ) : bool
EmailAddress string Email address to test.
return bool

IsValidFileName() public static method

Tests whether input string is a valid phone number.
public static IsValidFileName ( string FileName ) : bool
FileName string Phone number to test.
return bool

IsValidHTTPURI() public static method

Tests whether input string is a valid phone number.
public static IsValidHTTPURI ( string HTTPURI ) : bool
HTTPURI string Phone number to test.
return bool

IsValidIPv4() public static method

Tests whether input string is a valid phone number.
public static IsValidIPv4 ( string IPv4 ) : bool
IPv4 string Phone number to test.
return bool

IsValidIPv6() public static method

Tests whether input string is a valid phone number.
public static IsValidIPv6 ( string IPv6 ) : bool
IPv6 string Phone number to test.
return bool

IsValidPhoneNumber() public static method

Tests whether input string is a valid phone number.
public static IsValidPhoneNumber ( string PhoneNumber ) : bool
PhoneNumber string Phone number to test.
return bool

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

IsValidZIP5() public static method

Tests whether input string is a valid 5 digit ZIP Code.
public static IsValidZIP5 ( string ZIP5 ) : bool
ZIP5 string 5 digit ZIP Code to test.
return bool