RuleSet.NeedToValidateRule(IObjectSpace, IRule, Object, String, out String) Method

Checks if the rule is marked to be validated.

Namespace: DevExpress.Persistent.Validation

Assembly: DevExpress.Persistent.Base.v18.2.dll

Declaration

public static bool NeedToValidateRule(
    IObjectSpace targetObjectSpace,
    IRule rule,
    object target,
    string contextId,
    out string reason
)
Public Shared Function NeedToValidateRule(
    targetObjectSpace As IObjectSpace,
    rule As IRule,
    target As Object,
    contextId As String,
    ByRef reason As String
) As Boolean

Parameters

Type Name Description
IObjectSpace targetObjectSpace

An IObjectSpace used by a validation target.

IRule rule

The IRule object whose validation shall be checked.

Object target

A rule's target object.

String contextId

A CustomNeedToValidateRuleEventArgs.ContextId which is a validation context of the rule.

String reason

Returns a reason to validate the rule or not.

Returns

Type Description
Boolean

true, if the rule will be validated; otherwise, false.

See Also