C# Класс Aqueduct.Extensions.Validation

Summary for the Validation class
Показать файл Открыть проект

Открытые методы

Метод Описание
CleanCreditCardNumber ( this creditCard ) : string

Cleans the credit card number, returning just the numeric values.

IsAlpha ( this evalString ) : bool

Determines whether the specified eval string contains only alpha characters.

IsAlphaNumeric ( this evalString ) : bool

Determines whether the specified eval string contains only alphanumeric characters

IsAlphaNumeric ( this evalString, bool allowSpaces ) : bool

Determines whether the specified eval string contains only alphanumeric characters

IsCreditCardAmericanExpress ( this creditCard ) : bool

Determines whether the specified string is an American Express card

IsCreditCardAny ( this creditCard ) : bool

Determines whether the specified string is a valid credit, based on matching any one of the eight credit card strings

IsCreditCardBigFour ( this creditCard ) : bool

Determines whether the specified string is an American Express, Discover, MasterCard, or Visa

IsCreditCardCarteBlanche ( this creditCard ) : bool

Determines whether the specified string is an Carte Blanche card

IsCreditCardDinersClub ( this creditCard ) : bool

Determines whether the specified string is an Diner's Club card

IsCreditCardDiscover ( this creditCard ) : bool

Determines whether the specified string is a Discover card

IsCreditCardEnRoute ( this creditCard ) : bool

Determines whether the specified string is an En Route card

IsCreditCardJCB ( this creditCard ) : bool

Determines whether the specified string is an JCB card

IsCreditCardMasterCard ( this creditCard ) : bool

Determines whether the specified string is a Master Card credit card

IsCreditCardVisa ( this creditCard ) : bool

Determines whether the specified string is Visa card.

IsEmail ( this emailAddressString ) : bool

Determines whether the specified email address string is valid based on regular expression evaluation.

IsGuid ( this guid ) : bool

Determines whether the specified string is a valid GUID.

IsIPAddress ( this ipAddress ) : bool

Determines whether the specified string is a valid IP address.

IsLowerCase ( this inputString ) : bool

Determines whether the specified string is lower case.

IsNumeric ( this evalString ) : bool

Determines whether the specified eval string contains only numeric characters

IsSocialSecurityNumber ( this socialSecurityNumber ) : bool

Determines whether the specified string is a valid Social Security number. Dashes are optional.

IsStringNumeric ( this str ) : bool

Determine whether the passed string is numeric, by attempting to parse it to a double

IsStrongPassword ( this password ) : bool

Determines whether the specified string is consider a strong password based on the supplied string.

IsURL ( this url ) : bool

Determines whether the specified string is a valid URL string using the referenced regex string.

IsUSCurrency ( this currency ) : bool

Determines whether the specified string is a valid currency string using the referenced regex string.

IsUSTelephoneNumber ( this telephoneNumber ) : bool

Determines whether the specified string is a valid US phone number using the referenced regex string.

IsUpperCase ( this inputString ) : bool

Determines whether the specified string is upper case.

IsValidLuhn ( this digits ) : bool

Determines whether the specified int array passes the Luhn algorith

IsZIPCodeAny ( this zipCode ) : bool

Determines whether the specified string is a valid US Zip Code, using either 5 or 5+4 format.

IsZIPCodeFive ( this zipCode ) : bool

Determines whether the specified string is a valid US Zip Code, using the 5 digit format.

IsZIPCodeFivePlusFour ( this zipCode ) : bool

Determines whether the specified string is a valid US Zip Code, using the 5+4 format.

Приватные методы

Метод Описание
CreditPassesFormatCheck ( this creditCardNumber ) : bool

Determines whether the credit card number, once cleaned, passes the Luhn algorith. See: http://en.wikipedia.org/wiki/Luhn_algorithm

Описание методов

CleanCreditCardNumber() публичный статический Метод

Cleans the credit card number, returning just the numeric values.
public static CleanCreditCardNumber ( this creditCard ) : string
creditCard this The credit card.
Результат string

IsAlpha() публичный статический Метод

Determines whether the specified eval string contains only alpha characters.
public static IsAlpha ( this evalString ) : bool
evalString this The eval string.
Результат bool

IsAlphaNumeric() публичный статический Метод

Determines whether the specified eval string contains only alphanumeric characters
public static IsAlphaNumeric ( this evalString ) : bool
evalString this The eval string.
Результат bool

IsAlphaNumeric() публичный статический Метод

Determines whether the specified eval string contains only alphanumeric characters
public static IsAlphaNumeric ( this evalString, bool allowSpaces ) : bool
evalString this The eval string.
allowSpaces bool if set to true [allow spaces].
Результат bool

IsCreditCardAmericanExpress() публичный статический Метод

Determines whether the specified string is an American Express card
public static IsCreditCardAmericanExpress ( this creditCard ) : bool
creditCard this The credit card.
Результат bool

IsCreditCardAny() публичный статический Метод

Determines whether the specified string is a valid credit, based on matching any one of the eight credit card strings
public static IsCreditCardAny ( this creditCard ) : bool
creditCard this The credit card.
Результат bool

IsCreditCardBigFour() публичный статический Метод

Determines whether the specified string is an American Express, Discover, MasterCard, or Visa
public static IsCreditCardBigFour ( this creditCard ) : bool
creditCard this The credit card.
Результат bool

IsCreditCardCarteBlanche() публичный статический Метод

Determines whether the specified string is an Carte Blanche card
public static IsCreditCardCarteBlanche ( this creditCard ) : bool
creditCard this The credit card.
Результат bool

IsCreditCardDinersClub() публичный статический Метод

Determines whether the specified string is an Diner's Club card
public static IsCreditCardDinersClub ( this creditCard ) : bool
creditCard this The credit card.
Результат bool

IsCreditCardDiscover() публичный статический Метод

Determines whether the specified string is a Discover card
public static IsCreditCardDiscover ( this creditCard ) : bool
creditCard this The credit card.
Результат bool

IsCreditCardEnRoute() публичный статический Метод

Determines whether the specified string is an En Route card
public static IsCreditCardEnRoute ( this creditCard ) : bool
creditCard this The credit card.
Результат bool

IsCreditCardJCB() публичный статический Метод

Determines whether the specified string is an JCB card
public static IsCreditCardJCB ( this creditCard ) : bool
creditCard this The credit card.
Результат bool

IsCreditCardMasterCard() публичный статический Метод

Determines whether the specified string is a Master Card credit card
public static IsCreditCardMasterCard ( this creditCard ) : bool
creditCard this The credit card.
Результат bool

IsCreditCardVisa() публичный статический Метод

Determines whether the specified string is Visa card.
public static IsCreditCardVisa ( this creditCard ) : bool
creditCard this The credit card.
Результат bool

IsEmail() публичный статический Метод

Determines whether the specified email address string is valid based on regular expression evaluation.
public static IsEmail ( this emailAddressString ) : bool
emailAddressString this The email address string.
Результат bool

IsGuid() публичный статический Метод

Determines whether the specified string is a valid GUID.
public static IsGuid ( this guid ) : bool
guid this The GUID.
Результат bool

IsIPAddress() публичный статический Метод

Determines whether the specified string is a valid IP address.
public static IsIPAddress ( this ipAddress ) : bool
ipAddress this The ip address.
Результат bool

IsLowerCase() публичный статический Метод

Determines whether the specified string is lower case.
public static IsLowerCase ( this inputString ) : bool
inputString this The input string.
Результат bool

IsNumeric() публичный статический Метод

Determines whether the specified eval string contains only numeric characters
public static IsNumeric ( this evalString ) : bool
evalString this The eval string.
Результат bool

IsSocialSecurityNumber() публичный статический Метод

Determines whether the specified string is a valid Social Security number. Dashes are optional.
public static IsSocialSecurityNumber ( this socialSecurityNumber ) : bool
socialSecurityNumber this The Social Security Number
Результат bool

IsStringNumeric() публичный статический Метод

Determine whether the passed string is numeric, by attempting to parse it to a double
public static IsStringNumeric ( this str ) : bool
str this The string to evaluated for numeric conversion
Результат bool

IsStrongPassword() публичный статический Метод

Determines whether the specified string is consider a strong password based on the supplied string.
public static IsStrongPassword ( this password ) : bool
password this The password.
Результат bool

IsURL() публичный статический Метод

Determines whether the specified string is a valid URL string using the referenced regex string.
public static IsURL ( this url ) : bool
url this The URL string.
Результат bool

IsUSCurrency() публичный статический Метод

Determines whether the specified string is a valid currency string using the referenced regex string.
public static IsUSCurrency ( this currency ) : bool
currency this The currency string.
Результат bool

IsUSTelephoneNumber() публичный статический Метод

Determines whether the specified string is a valid US phone number using the referenced regex string.
public static IsUSTelephoneNumber ( this telephoneNumber ) : bool
telephoneNumber this The telephone number.
Результат bool

IsUpperCase() публичный статический Метод

Determines whether the specified string is upper case.
public static IsUpperCase ( this inputString ) : bool
inputString this The input string.
Результат bool

IsValidLuhn() публичный статический Метод

Determines whether the specified int array passes the Luhn algorith
public static IsValidLuhn ( this digits ) : bool
digits this The int array to evaluate
Результат bool

IsZIPCodeAny() публичный статический Метод

Determines whether the specified string is a valid US Zip Code, using either 5 or 5+4 format.
public static IsZIPCodeAny ( this zipCode ) : bool
zipCode this The zip code.
Результат bool

IsZIPCodeFive() публичный статический Метод

Determines whether the specified string is a valid US Zip Code, using the 5 digit format.
public static IsZIPCodeFive ( this zipCode ) : bool
zipCode this The zip code.
Результат bool

IsZIPCodeFivePlusFour() публичный статический Метод

Determines whether the specified string is a valid US Zip Code, using the 5+4 format.
public static IsZIPCodeFivePlusFour ( this zipCode ) : bool
zipCode this The zip code.
Результат bool