Click or drag to resize

ViewModelAddValidationRuleT Method

Adds a validation rule for a property.

Namespace:  Enkoni.Framework.UI.Mvvm
Assembly:  Enkoni.Framework.UI (in Enkoni.Framework.UI.dll) Version: 1.3.0.1
Syntax
protected void AddValidationRule<T>(
	Expression<Func<T>> property,
	Func<string> rule
)

Parameters

property
Type: System.Linq.ExpressionsExpressionFuncT
The property that is validated by the rule.
rule
Type: SystemFuncString
The rule. (The parameter added to the function is the name of the property).

Type Parameters

T
The type of the property.
See Also