OpenPetra
Free Administration Software for Non-Profits
Ict.Common.Verification.TStringChecks Class Reference

Class for string verifications that are needed both on Server and Client side. More...

Static Public Member Functions

static TVerificationResult StringMustNotBeEmpty (string AValue, string ADescription, object AResultContext=null, System.Data.DataColumn AResultColumn=null)
 Checks whether a strings is null or String.Empty. Null values are accepted. More...
 
static TVerificationResult StringLengthLesserOrEqual (string AValue, int APermittedStringLength, string ADescription, object AResultContext=null, System.Data.DataColumn AResultColumn=null)
 Checks whether a strings' length is lesser or equal to the specified amount of characters. Null values are accepted. More...
 
static TVerificationResult FirstLesserOrEqualThanSecondString (String ATxt1, String ATxt2, String AFirstDescription, String ASecondDescription, object AResultContext=null, System.Data.DataColumn AResultColumn=null)
 Checks whether two strings are in correct order (lexical comparison). Null values are accepted. More...
 
static TVerificationResult ValidateValueIsActive (Int32 ALedgerNumber, DataTable ADataTable, String AKeyValue, String AActiveColumn, object AResultContext=null, System.Data.DataColumn AResultColumn=null)
 Used for checking if a particular lookup value relates to an inactive record More...
 
static TVerificationResult ValidateEmail (String AEmailAddress)
 Checks whether an e-mail address is valid (logical only, no lookup is done). Does not allow more than one email address in the AEmailAddress Argument. More...
 
static TVerificationResult ValidateEmail (String AEmailAddress, object AResultContext, System.Data.DataColumn AResultColumn)
 Checks whether an e-mail address is valid (logical only, no lookup is done). Does not allow more than one email address in the AEmailAddress Argument. More...
 
static TVerificationResult ValidateEmail (String AEmailAddress, Boolean AAllowMoreThanOneEMailAddress, object AResultContext=null, System.Data.DataColumn AResultColumn=null)
 Checks whether an e-mail address is valid (logical only, no lookup is done). Multiple email addresses may be contained in Argument AEmailAddress if Argument AAllowMoreThanOneEMailAddress is set to true. More...
 

Static Public Attributes

const String ERR_EMAILADDRESSINVALID = "GENC.00017V"
 Email Address is invalid. More...
 

Detailed Description

Class for string verifications that are needed both on Server and Client side.

None of the data verifications in here must access the database since the Client doesn't have access to the database!

Member Function Documentation

◆ FirstLesserOrEqualThanSecondString()

static TVerificationResult Ict.Common.Verification.TStringChecks.FirstLesserOrEqualThanSecondString ( String  ATxt1,
String  ATxt2,
String  AFirstDescription,
String  ASecondDescription,
object  AResultContext = null,
System.Data.DataColumn  AResultColumn = null 
)
inlinestatic

Checks whether two strings are in correct order (lexical comparison). Null values are accepted.

Parameters
ATxt1The first string; it is supposed to be lesser or equal than ATxt2.
ATxt2The second string; it is supposed to be greater or equal than ATxt1.
AFirstDescriptionDescription what the value is about (for the error message).
ASecondDescriptionDescription what the value is about (for the error message).
AResultContextContext of verification (can be null).
AResultColumnWhich System.Data.DataColumn failed (can be null).
Returns
Null if ATxt1 is lesser or equal than ATxt2 , otherwise a TVerificationResult is returned that contains details about the problem, with a message that uses AFirstDescription and ASecondDescription .

◆ StringLengthLesserOrEqual()

static TVerificationResult Ict.Common.Verification.TStringChecks.StringLengthLesserOrEqual ( string  AValue,
int  APermittedStringLength,
string  ADescription,
object  AResultContext = null,
System.Data.DataColumn  AResultColumn = null 
)
inlinestatic

Checks whether a strings' length is lesser or equal to the specified amount of characters. Null values are accepted.

Parameters
AValueThe string to check.
APermittedStringLengthThe permitted amount of characters.
ADescriptionDescription what the value is about (for the error message).
AResultContextContext of verification (can be null).
AResultColumnWhich System.Data.DataColumn failed (can be null).
Returns
Null if AValue is not null and not String.Empty, otherwise a TVerificationResult is returned that contains details about the problem, with a message that uses ADescription .

◆ StringMustNotBeEmpty()

static TVerificationResult Ict.Common.Verification.TStringChecks.StringMustNotBeEmpty ( string  AValue,
string  ADescription,
object  AResultContext = null,
System.Data.DataColumn  AResultColumn = null 
)
inlinestatic

Checks whether a strings is null or String.Empty. Null values are accepted.

Parameters
AValueThe string to check.
ADescriptionDescription what the value is about (for the error message).
AResultContextContext of verification (can be null).
AResultColumnWhich System.Data.DataColumn failed (can be null).
Returns
Null if AValue is not null and not String.Empty, otherwise a TVerificationResult is returned that contains details about the problem, with a message that uses ADescription .

◆ ValidateEmail() [1/3]

static TVerificationResult Ict.Common.Verification.TStringChecks.ValidateEmail ( String  AEmailAddress)
inlinestatic

Checks whether an e-mail address is valid (logical only, no lookup is done). Does not allow more than one email address in the AEmailAddress Argument.

Parameters
AEmailAddressE-mail address that should be verified.
Returns
Null if AEmailAddress contains a valid email address, otherwise a TVerificationResult is returned that contains details about the problem (also in the case where more than one e-mail Address is contained in AEmailAddress - even if the e-mail Addresses are correct!).

◆ ValidateEmail() [2/3]

static TVerificationResult Ict.Common.Verification.TStringChecks.ValidateEmail ( String  AEmailAddress,
Boolean  AAllowMoreThanOneEMailAddress,
object  AResultContext = null,
System.Data.DataColumn  AResultColumn = null 
)
inlinestatic

Checks whether an e-mail address is valid (logical only, no lookup is done). Multiple email addresses may be contained in Argument AEmailAddress if Argument AAllowMoreThanOneEMailAddress is set to true.

Parameters
AEmailAddressE-mail address that should be verified.
AAllowMoreThanOneEMailAddressSet this to true if more than one e-mail Address can be contained in AEmailAddress. If this is set to true, all contained e-mail Addresses will be validated. Recognized separators are comma and semicolon (',' and ';').
AResultContextContext of verification (can be null).
AResultColumnWhich System.Data.DataColumn failed (can be null).
Returns
Null if AEmailAddress contains a valid email address, otherwise a TVerificationResult is returned that contains details about the problem (also in the case where AAllowMoreThanOneEMailAddress is set to false and more than one e-mail Address is contained in AEmailAddress - even if the e-mail Addresses are correct!).

◆ ValidateEmail() [3/3]

static TVerificationResult Ict.Common.Verification.TStringChecks.ValidateEmail ( String  AEmailAddress,
object  AResultContext,
System.Data.DataColumn  AResultColumn 
)
inlinestatic

Checks whether an e-mail address is valid (logical only, no lookup is done). Does not allow more than one email address in the AEmailAddress Argument.

Parameters
AEmailAddressE-mail address that should be verified.
AResultContextContext of verification (can be null).
AResultColumnWhich System.Data.DataColumn failed (can be null).
Returns
Null if AEmailAddress contains a valid email address, otherwise a TVerificationResult is returned that contains details about the problem (also in the case where more than one e-mail Address is contained in AEmailAddress - even if the e-mail Addresses are correct!).

◆ ValidateValueIsActive()

static TVerificationResult Ict.Common.Verification.TStringChecks.ValidateValueIsActive ( Int32  ALedgerNumber,
DataTable  ADataTable,
String  AKeyValue,
String  AActiveColumn,
object  AResultContext = null,
System.Data.DataColumn  AResultColumn = null 
)
inlinestatic

Used for checking if a particular lookup value relates to an inactive record

Parameters
ALedgerNumber
ADataTable
AKeyValue
AActiveColumn
AResultContext
AResultColumn
Returns

Member Data Documentation

◆ ERR_EMAILADDRESSINVALID

const String Ict.Common.Verification.TStringChecks.ERR_EMAILADDRESSINVALID = "GENC.00017V"
static

Email Address is invalid.


The documentation for this class was generated from the following file: