EmailRule

A validation rule that demands that the validated field match the Email pattern.

Type: Object

Show Example:
AngularJS
Knockout
jQuery

In this example, the 'email' rule is applied to the 'Email' editor. This rule demands that the editor value match the Email pattern. To check this rule, specify a wrong email.


                                    

                                    

In this example, the 'email' rule is applied to the 'Email' editor. This rule demands that the editor value match the Email pattern. To check this rule, specify a wrong email.


                                    

                                    

In this example, the 'email' rule is applied to the 'Email' editor. This rule demands that the editor value match the Email pattern. To check this rule, specify a wrong email.


                                    

                                    

message

Specifies the message that is shown for end-users if the current rule is broken.

Type: String
Default Value: 'Email is invalid'

You do not have to specify this field. In this instance, a default message will be shown. To include the name of the validated editor into the default validation message as a subject, set the name field of the dxValidator object.

type

Specifies the type of the current rule.

Type: String
Accepted Values: 'email'

Set this field to 'email' to define a rule that will be broken if the validated value does not match the Email pattern.