Skip to main content

ValidationRulesFactory.AddNumeric() Method

Adds a validation rule that checks if an editor has a numeric value.

Namespace: DevExtreme.AspNet.Mvc.Factories

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public NumericRuleBuilder AddNumeric()

Returns

Type Description
NumericRuleBuilder

A NumericRuleBuilder instance.

Remarks

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

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