OpenTAP 9.25
API Reference
Public Member Functions | List of all members
OpenTap.ValidationRuleCollection Class Reference

Collection of validation rules. Simplifies adding new rules by abstracting the use of ValidationRule objects. More...

Inherits Collection< ValidationRule >.

Public Member Functions

void Add (IsValidDelegateDefinition isValid, string errorMessage, string propertyName)
 Add a new rule to the collection. More...
 
void Add (IsValidDelegateDefinition isValid, string errorMessage)
 This overload of ValidationRuleCollection.Add should not be used. This placeholder method is added to provide a warning. More...
 
void Add (IsValidDelegateDefinition isValid, CustomErrorDelegateDefinition errorDelegate, string propertyName)
 Adds a new rule to the collection. More...
 
void Add (IsValidDelegateDefinition isValid, string errorMessage, params string[] propertyNames)
 Add a new rule to the collection for multiple properties. Internally a new rule is created for each property. More...
 
void Add (IsValidDelegateDefinition isValid, CustomErrorDelegateDefinition errorDelegate, params string[] propertyNames)
 Adds a new rule to the collection. More...
 

Detailed Description

Collection of validation rules. Simplifies adding new rules by abstracting the use of ValidationRule objects.

Member Function Documentation

◆ Add() [1/5]

void OpenTap.ValidationRuleCollection.Add ( IsValidDelegateDefinition  isValid,
CustomErrorDelegateDefinition  errorDelegate,
params string[]  propertyNames 
)
inline

Adds a new rule to the collection.

Parameters
isValid
errorDelegate
propertyNamesNames of the properties it affects.

◆ Add() [2/5]

void OpenTap.ValidationRuleCollection.Add ( IsValidDelegateDefinition  isValid,
CustomErrorDelegateDefinition  errorDelegate,
string  propertyName 
)
inline

Adds a new rule to the collection.

Parameters
isValid
errorDelegate
propertyName

◆ Add() [3/5]

void OpenTap.ValidationRuleCollection.Add ( IsValidDelegateDefinition  isValid,
string  errorMessage 
)
inline

This overload of ValidationRuleCollection.Add should not be used. This placeholder method is added to provide a warning.

Parameters
isValidRule checking function.
errorMessageError if rule checking function returns false.

◆ Add() [4/5]

void OpenTap.ValidationRuleCollection.Add ( IsValidDelegateDefinition  isValid,
string  errorMessage,
params string[]  propertyNames 
)
inline

Add a new rule to the collection for multiple properties. Internally a new rule is created for each property.

Parameters
isValidRule checking function.
errorMessageError if rule checking function returns false.
propertyNamesNames of the properties it affects.

◆ Add() [5/5]

void OpenTap.ValidationRuleCollection.Add ( IsValidDelegateDefinition  isValid,
string  errorMessage,
string  propertyName 
)
inline

Add a new rule to the collection.

Parameters
isValidRule checking function.
errorMessageError if rule checking function returns false.
propertyNameName of the property it affects.

OpenTAP 9.25 API built Tue Aug 6 2024 07:49:25