The following tables list the members exposed by CompareFieldValidator.
| Name | Description | |
|---|---|---|
![]() | CompareFieldValidator Constructor | Overloaded. Default Constructor - provides no special functionality. |
| Name | Description | |
|---|---|---|
![]() | _errorString | (Inherited from BaseFieldValidator) |
| Name | Description | |
|---|---|---|
![]() | ComparisonType | ComparisonType property is used by the field validation to compare the value to the value of the FieldToCompare field. |
![]() | CustomErrorMessage | Overridden.
CustomErrorMessage can be used to specify the error message that will be formatted
and returned instead of the standard error message.
NOTE: Formatting can be specified by using {0} and {1} place holders inside the string. The following place holders can be used:
|
![]() | Enabled | Enabled property can be used to easily turn off or on a validator. If the value of Enabled is set to false, this validator will not be used in validation. (Inherited from BaseFieldValidator) |
![]() | ErrorString | Overridden. If the validation fails the error message is available via this property.
If the CustomErrorMessage is set, the ErrorString property will automatically return the CustomErrorMessage after formatting it. |
![]() | FieldToCompare | Field that will be used to compare values. Comparison will be based on the ComparisonType property. |
![]() | FieldToValidate | Field instance that will be validated by this validation. (Inherited from BaseFieldValidator) |
![]() | IsNullValid | IsNullValid - When set to true, this validator returns true even if the field value is null. |
![]() | IsValid | Returns true if the validation is valid or the FieldToValidate property is null. (Inherited from BaseFieldValidator) |
![]() | Name | Used to uniquely identify each validator. When a new Field instance is passed into the constructor or the FieldToValidate property is set, the Name property is automatically populated, hence it is not required to set this value. Setting this value to a custom name will help you access this validator instance from the Validators collection by using the custom name. (Inherited from BaseFieldValidator) |
![]() | ValidatorType | Overridden. ValidatorType - Returns the value ValidatorTypes.CompareFieldValidator. |
| Name | Description | |
|---|---|---|
![]() | GetValidatorTypeName | Overridden. GetValidatorTypeName - Returns string value for the validator type. |
![]() | Validate | Overridden. Returns false if the validator fails. If the FieldToValidate is null then then this method returns true. |



