Click or drag to resize
ValidatorMatchesConditionT Method
Validates whether the specified value meets the specified condition.

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 11.0.0
Syntax
C#
public Validator MatchesCondition<T>(
	T source,
	Func<T, bool> condition,
	string errorMessage
)

Parameters

source
Type: T
A value to validate.
condition
Type: SystemFuncT, Boolean
A condition to match.
errorMessage
Type: SystemString
The error message to report when validation fails.

Type Parameters

T
The type of value to validate.

Return Value

Type: Validator
See Also