ValidationHelper MembersKentico 8.1 API Reference
The ValidationHelper type exposes the following members.
Constructors

  NameDescription
Public methodValidationHelper
Back to Top
Methods

  NameDescription
Public methodStatic memberAreEmails(Object)
Returns true if the object representation matches the Email list (email adresses separated by semicolon).
Public methodStatic memberAreEmails(Object, String)
Returns true if the object representation matches the Email list separated by specified character (default separator is semicolon).
Public methodStatic memberBase64Decode
Method used to obtain original text formatted to UTF-8 and encoded in base64
Public methodOnlineEquals
Determines whether the specified OnlineObject is equal to the current OnlineObject.
(Inherited from OnlineObject.)
Protected methodOnlineFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from OnlineObject.)
Public methodStatic memberGetBinary
Returns the byte[] representation of an object or default value if not.
Public methodStatic memberGetBoolean
Returns the boolean representation of an object or default value if not.
Public methodStatic memberGetCodeName(Object, Int32)
Gets the code name created from the given string.
Public methodStatic memberGetCodeName(String, String, String)
Gets the code name created from the given display name.
Public methodStatic memberGetCodeName(Object, String, Int32, Boolean, Boolean, String, Boolean)
Gets the code name created from the given string.
Public methodStatic memberGetColor
Returns the color representation of a query parameter or default value if parameter is not a valid color.
Public methodStatic memberGetDate(Object, DateTime)
Returns the DateTime representation of an object or default value if not.
Public methodStatic memberGetDate(Object, DateTime, CultureInfo)
Returns the DateTime representation of an object or default value if not.
Public methodStatic memberGetDateSystem
Returns the DateTime representation of an object (using English representation of date and time) or default value if not.
Public methodStatic memberGetDateTime(Object, DateTime, CultureInfo)
Returns the DateTime representation of an object or default value if not.
Public methodStatic memberGetDateTime(Object, DateTime, String)
Returns the DateTime representation of an object or default value if not.
Public methodStatic memberGetDateTimeSystem
Returns the DateTime representation of an object (using English representation of date and time) or default value if not.
Public methodStatic memberGetDecimal(Object, Decimal)
Converts the given object to a decimal value
Public methodStatic memberGetDecimal(Object, Decimal, CultureInfo)
Converts the given object to a decimal value
Public methodStatic memberGetDecimalSystem
Converts the given object to a decimal value
Public methodStatic memberGetDefaultHashStringSalt
Gets the default hash string salt
Public methodStatic memberGetDouble(Object, Double, CultureInfo)
Returns the double representation of an object or default value if not.
Public methodStatic memberGetDouble(Object, Double, String)
Returns the double representation of an object or default value if not.
Public methodStatic memberGetDoubleSystem
Returns the double representation of an object (using English representation of floating point numbers) or default value if not.
Public methodStatic memberGetFloat
Returns the double representation of an object or default value if not.
Public methodStatic memberGetGuid
Returns the GUID representation of an object or default value if not.
Public methodOnlineGetHashCode
Serves as a hash function for a particular type.
(Inherited from OnlineObject.)
Public methodStatic memberGetHashString
Gets the SHA2 hash for the given value (salt unique to certain user session and database is added).
Public methodStatic memberGetHResult
Converts HResult (ErrorCode) from exception to format comparable with error codes in hex format.
Public methodStatic memberGetIdentifier(Object)
Gets the identifier created from the given name
Public methodStatic memberGetIdentifier(Object, String)
Gets the identifier created from the given name
Public methodStatic memberGetInteger
Returns the integer representation of an object or default value if not.
Public methodStatic memberGetIntegers
Returns array of integer represenations of supplied values or default value when not an int.
Public methodStatic memberGetLanguage
Gets the language created from the given string.
Public methodStatic memberGetLong
Returns the long representation of an object or default value if not.
Public methodStatic memberGetNullableBoolean
Returns the boolean representation of an object or default value if a conversion doesn't exist.
Public methodStatic memberGetSafeFileName
Get safe file name in which forbidden characters are replaced with specified replacement
Public methodStatic memberGetSafeInteger
Returns the integer representation of an object or default value if not. Consumes all exceptions.
Public methodStatic memberGetSafeRoleName
Gets safe version of rolename.
Public methodStatic memberGetSafeUserName
Gets safe version of username.
Public methodStatic memberGetSafeXML
Removes forbidden characters from given xml string.
Public methodStatic memberGetString(Object, String, CultureInfo)
Returns the string representation of an object or default value if not.
Public methodStatic memberGetString(Object, String, String)
Returns the string representation of an object or default value if not.
Public methodStatic memberGetString(Object, String, String, String)
Returns the string representation of an object or default value if not.
Public methodStatic memberGetStringFromHash
Gets string from byte array.
Public methodStatic memberGetTimeSpan(Object, TimeSpan)
Converts the given object to a decimal value
Public methodStatic memberGetTimeSpan(Object, TimeSpan, CultureInfo)
Converts the given object to a decimal value
Public methodStatic memberGetTimeSpanSystem
Converts the given object to a decimal value
Public methodOnlineGetType
Gets the OnlineType of the current instance.
(Inherited from OnlineObject.)
Public methodStatic memberGetValue ReturnType (Object)
Converts the value to specified type.
Public methodStatic memberGetValue T (Object, T)
Converts the value to specified type. If the value is null, default value is used.
Public methodStatic memberIsAllowedXMLCharacter
Returns true if the character is within range of allowed characters.
Public methodStatic memberIsBoolean
Returns true if the object representation matches the Boolean type.
Public methodStatic memberIsCodeName
Returns true if the object representation matches the Code name.
Public methodStatic memberIsColor
Returns true if the object representation matches the hexa color code expression.
Public methodStatic memberIsDateTime
Returns true if the object representation matches the date time format.
Public methodStatic memberIsDecimal
Returns true if the object representation matches the Decimal type.
Public methodStatic memberIsDouble
Returns true if the object representation matches the Double type.
Public methodStatic memberIsDoubleSystem
Returns true if the object representation matches the Double type in English culture.
Public methodStatic memberIsEmail
Returns true if the object representation matches the Email.
Public methodStatic memberIsFileName
Returns true if the object representation matches the file name.
Public methodStatic memberIsFolderName
Returns true if the object representation matches the folder name.
Public methodStatic memberIsFullName
Returns true if the object representation matches full name form ([namespace].[classname].[identifier]).
Public methodStatic memberIsGuid
Returns true if the object representation matches the Guid type.
Public methodStatic memberIsIdentifier
Returns true if the object representation matches the IdentifierRegExp.
Public methodStatic memberIsInRange(Double, Double, Double)
Returns true if value is higher than or equal to minimum and lesser than or equal to maximum.
Public methodStatic memberIsInRange(Int32, Int32, Int32)
Returns true if value is higher than or equal to minimum and lesser than or equal to maximum.
Public methodStatic memberIsInteger
Returns true if the object representation matches the Integer type.
Public methodStatic memberIsIntervalValid
Rreturns true if fromDate precedes toDate.
Public methodStatic memberIsLong
Returns true if the object representation matches the Long type.
Public methodStatic memberIsPositiveNumber
Returns true if the object representation matches the positive number.
Public methodStatic memberIsRegularExp
Returns true if the object representation matches given regular expression.
Public methodStatic memberIsSpecialFileName
Returns true if the file name is restricted.
Public methodStatic memberIsSpecialFolderName
Returns true if the folder name is restricted.
Public methodStatic memberIsType
Returns true if value is of type.
Public methodStatic memberIsURL
Returns true if the given URL is valid.
Public methodStatic memberIsUserName
Returns true if the object representation matches the User name.
Public methodStatic memberIsUsPhoneNumber
Returns true if the object representation matches the U.S. Phone number.
Public methodStatic memberIsValidClientID
Returns true if the object representation matches the criteria for valid client id value.
Public methodStatic memberLoadBoolean
Attempts to load the given new value as a bool to the result. Returns true if the conversion of the new value was successful, if not, returns false and keeps the value the same.
Public methodStatic memberLoadDateTime
Attempts to load the given new value as a DateTime to the result. Returns true if the conversion of the new value was successful, if not, returns false and keeps the value the same.
Public methodStatic memberLoadDateTimeSystem
Attempts to load the given new value as a DateTime to the result (it uses en-us culture). Returns true if the conversion of the new value was successful, if not, returns false and keeps the value the same.
Public methodStatic memberLoadDouble
Attempts to load the given new value as a double to the result. Returns true if the conversion of the new value was successful, if not, returns false and keeps the value the same.
Public methodStatic memberLoadDoubleSystem
Attempts to load the given new value as a double to the result (it uses en-us culture). Returns true if the conversion of the new value was successful, if not, returns false and keeps the value the same.
Public methodStatic memberLoadGuid
Attempts to load the given new value as a Guid to the result. Returns true if the conversion of the new value was successful, if not, returns false and keeps the value the same.
Public methodStatic memberLoadInteger
Attempts to load the given new value as an integer to the result. Returns true if the conversion of the new value was successful, if not, returns false and keeps the value the same.
Public methodStatic memberLoadLong
Attempts to load the given new value as a long to the result. Returns true if the conversion of the new value was successful, if not, returns false and keeps the value the same.
Public methodStatic memberLoadString
Attempts to load the given new value as a string to the result. Returns true if the conversion of the new value was successful, if not, returns false and keeps the value the same.
Protected methodOnlineMemberwiseClone
Creates a shallow copy of the current OnlineObject.
(Inherited from OnlineObject.)
Public methodOnlineToString
Returns a string that represents the current object.
(Inherited from OnlineObject.)
Public methodStatic memberValidateHash
Validates the hash for the given value.
Back to Top
Extension Methods

  NameDescription
Public Extension MethodAsValue
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.)
Public Extension MethodGetAPIString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodGetString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodToBoolean
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDateTime
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDouble
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToGuid
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToInteger
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToString
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.)
Back to Top
Fields

  NameDescription
Public fieldStatic memberAPP_SETTINGS_HASH_STRING_SALT
App setting key for hash string salt.
Back to Top
Properties

  NameDescription
Public propertyStatic memberClientIDRexExp
Gets or sets the regular expression for client id validation.
Public propertyStatic memberCodenameRegExp
Codename regular expression.
Public propertyStatic memberColorRegExp
Hexa color code regular expression.
Public propertyStatic memberCustomEmailRegExpString
Custom email regular expression string from web.config for email validation.
Public propertyStatic memberCustomUsernameRegExpString
Custom user name regular expression string from web.config for user name validation.
Public propertyStatic memberEmailRegExp
Gets the regular expression used to validate e-mail addresses.
Public propertyStatic memberFileNameForbiddenCharRegExp
Regular expression to match forbidden characters in file name.
Public propertyStatic memberFolderRegExp
Folder regular expression.
Public propertyStatic memberGuidRegExp
GUID regular expression.
Public propertyStatic memberHashStringSalt
Returns salt used for hashing string in GetHashString() method.
Public propertyStatic memberIdentifierRegExp
Identifier regular expression.
Public propertyStatic memberIntRegExp
Integer regular expression.
Public propertyStatic memberLongRegExp
Long regular expression.
Public propertyStatic memberUnicodeCodenameRegExp
Codename regular expression with support of Unicode letters.
Public propertyStatic memberURLRegExp
URL regular expression.
Public propertyStatic memberUsernameRegExp
Username regular expression.
Public propertyStatic memberUseSafeRoleName
Indicates whether to use safe or normal role names.
Public propertyStatic memberUseSafeUserName
Indicates whether to use safe or normal user names.
Public propertyStatic memberUsPhoneNumberRegExp
U.S. Phone number regular expression.
Back to Top
See Also