OpenTAP 9.34
API Reference
OpenTap.DelegateValidationRule Class Reference

Validation rule that takes a delegate as an argument. Used for writing error messages. More...

Inheritance diagram for OpenTap.DelegateValidationRule:
OpenTap.ValidationRule

Public Member Functions

 DelegateValidationRule (IsValidDelegateDefinition isValid, string propertyName, CustomErrorDelegateDefinition errorDelegate)
 Constructor for DelegateValidationRule.
 
- Public Member Functions inherited from OpenTap.ValidationRule
 ValidationRule (IsValidDelegateDefinition isValid, string errorMessage, string propertyName)
 

Public Attributes

CustomErrorDelegateDefinition ErrorDelegate
 The delegate producing the error message.
 

Properties

override string ErrorMessage [get, set]
 The error calculated from ErrorDelegate.
 
- Properties inherited from OpenTap.ValidationRule
string PropertyName [get, set]
 Name of the property affected by this rule.
 
virtual string ErrorMessage [get, set]
 Error message to use if the property does not follow the rule.

 
IsValidDelegateDefinition IsValid [get, set]
 Rule function following the signature () -> bool.

 

Detailed Description

Validation rule that takes a delegate as an argument. Used for writing error messages.

Constructor & Destructor Documentation

◆ DelegateValidationRule()

OpenTap.DelegateValidationRule.DelegateValidationRule ( IsValidDelegateDefinition isValid,
string propertyName,
CustomErrorDelegateDefinition errorDelegate )
inline

Constructor for DelegateValidationRule.

Parameters
isValidValidation delegate.
propertyNameTarget property.
errorDelegateFunction creating the error message.

OpenTAP 9.34 API built Wed Jul 1 2026 09:21:14