'Declaration Public Function New( _ ByVal criterionName As String, _ ByVal level As ValidationLevel, _ ByVal compareOperator As CompareValueOperator, _ ByVal inputControl As Control, _ ByVal dataType As ValidationDataType, _ 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 compareOperator As CompareValueOperator Dim inputControl As Control Dim dataType As ValidationDataType Dim requiredField As Boolean Dim caseSensitive As Boolean Dim trim As Boolean Dim customMessages As CustomValidationMessages Dim instance As New InputValueCriterion(criterionName, level, compareOperator, inputControl, dataType, requiredField, caseSensitive, trim, customMessages)
public InputValueCriterion( string criterionName, ValidationLevel level, CompareValueOperator compareOperator, Control inputControl, ValidationDataType dataType, 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.
- compareOperator
- An CompareValueOperator value representing the operator used to compare the input component's value with the passed component's value (inputControl).
- inputControl
- The passed input component whose value will be used in the comparison using the criterion.
- dataType
- An ValidationDataType value representing the expected data type for the criterion.
- 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.