ValidatorMatchesConditionT Method |
Validates whether the specified value meets the specified condition.
Namespace: CMS.HelpersAssembly: CMS.Helpers (in CMS.Helpers.dll) Version: 12.0.0
Syntax 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:
ValidatorSee Also