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
Syntaxprotected void AddValidationRule<T>(
Expression<Func<T>> property,
Func<string> rule
)
Protected Sub AddValidationRule(Of T) (
property As Expression(Of Func(Of T)),
rule As Func(Of String)
)
protected:
generic<typename T>
void AddValidationRule(
Expression<Func<T>^>^ property,
Func<String^>^ rule
)
member AddValidationRule :
property : Expression<Func<'T>> *
rule : Func<string> -> unit
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