Skip to main content

ValidationRulesFactory.AddCustom() Method

Adds a custom validation rule.

Namespace: DevExtreme.AspNet.Mvc.Factories

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public CustomRuleBuilder AddCustom()

Returns

Type Description
CustomRuleBuilder

A CustomRuleBuilder instance.

Remarks

Refer to Validate Editors Used in Composite Controls for more information.

@(Html.DevExtreme().DataGrid()
    .Columns(columns => {
        columns.Add().ValidationRules(rules => {
            rules.AddCustom()
                // call methods to specify nested options
            });
    })
)
See Also