Xceed Grid for WinForms v4.3 Documentation
RegularExpressionCriterion Constructor(String,ValidationLevel,String,Boolean,Boolean,Boolean,CustomValidationMessages)


Xceed.Validation.v1.3 Assembly > Xceed.Validation Namespace > RegularExpressionCriterion Class > RegularExpressionCriterion Constructor : RegularExpressionCriterion Constructor(String,ValidationLevel,String,Boolean,Boolean,Boolean,CustomValidationMessages)
A string that substitutes name variable in error messages to define the criterion.
An ValidationLevel value representing the moment at which validation will be performed for the criterion.
A string representing the regular expression used to validate the input component's value
true if the input component must contain a value; false otherwise.
true if the criterion is case sensitive; false otherwise.
true if whitespace characters should be trimmed from the input component's value before testing with the criterion; false otherwise.
A CustomValidationMessages object representing the custom messages for this validation criterion. a null reference (Nothing in Visual Basic) is accepted and states that the ValidationProvider.DefaultValidationMessages will be used when validating.
Initializes a new instance of the RegularExpressionCriterion class using the specified values.
Syntax
'Declaration
 
Public Function New( _
   ByVal criterionName As String, _
   ByVal level As ValidationLevel, _
   ByVal regularExpression As String, _
   ByVal requiredField As Boolean, _
   ByVal caseSensitive As Boolean, _
   ByVal trim As Boolean, _
   ByVal customMessages As CustomValidationMessages _
)
'Usage
 
Dim criterionName As String
Dim level As ValidationLevel
Dim regularExpression As String
Dim requiredField As Boolean
Dim caseSensitive As Boolean
Dim trim As Boolean
Dim customMessages As CustomValidationMessages
 
Dim instance As New RegularExpressionCriterion(criterionName, level, regularExpression, requiredField, caseSensitive, trim, customMessages)
public RegularExpressionCriterion( 
   string criterionName,
   ValidationLevel level,
   string regularExpression,
   bool requiredField,
   bool caseSensitive,
   bool trim,
   CustomValidationMessages customMessages
)

Parameters

criterionName
A string that substitutes name variable in error messages to define the criterion.
level
An ValidationLevel value representing the moment at which validation will be performed for the criterion.
regularExpression
A string representing the regular expression used to validate the input component's value
requiredField
true if the input component must contain a value; false otherwise.
caseSensitive
true if the criterion is case sensitive; false otherwise.
trim
true if whitespace characters should be trimmed from the input component's value before testing with the criterion; false otherwise.
customMessages
A CustomValidationMessages object representing the custom messages for this validation criterion. a null reference (Nothing in Visual Basic) is accepted and states that the ValidationProvider.DefaultValidationMessages will be used when validating.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RegularExpressionCriterion Class
RegularExpressionCriterion Members
Overload List