IModelValidationContext.AllowInplaceValidation Property
Specifies whether or not in-place validation is allowed for the current context.
Namespace: DevExpress.ExpressApp.Validation
Assembly: DevExpress.ExpressApp.Validation.v24.1.dll
NuGet Package: DevExpress.ExpressApp.Validation
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | false | true, if the current context uses in-place validation; otherwise, false. |
Remarks
In-place validation occurs immediately for the current context after the input focus changes. It is enabled for the Save context by default.
The following error message is displayed when the input focus changes.
The in-place validation occurs only if the rule evaluation does not require querying additional data from the server. Thus, only the following rules can be validated immediately.
- RuleRequiredFieldAttribute
- RuleRegularExpressionAttribute
- RuleStringComparisonAttribute
- RuleValueComparisonAttribute
- RuleRangeAttribute
As the rule evaluation occurs on the client side, the in-place validation does not occur when:
- the rule’s target property is a collection, image or reference property (except for RuleReqiredField which is supported for reference properties);
- the ParametersMode type parameter passed to the RuleRange or the RuleValueComparison attribute is set to Expression;
- the RuleBaseAttribute.TargetCriteria is specified.
When in-place validation is enabled, the regular validation mechanism is still triggered when an Action associated with the current context is executed.
Note
The asterisk (*) symbol is appended to an editor label when the RuleRequiredField is applied.
Important
The in-place validation engine relies on Controllers provided in the platform-specific ValidationWindowsFormsModule and ValidationAspNetModule. So, ensure that these modules are added from the Toolbox in the Application Designer.