Skip to main content

ValidationRulesFactory.AddEmail() Method

Adds a validation rule that checks if an editor’s value is a valid e-mail.

Namespace: DevExtreme.AspNet.Mvc.Factories

Assembly: DevExtreme.AspNet.Core.dll

Declaration

public EmailRuleBuilder AddEmail()

Returns

Type Description
EmailRuleBuilder

A EmailRuleBuilder instance.

Remarks

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

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