JavaScript/jQuery Validator - EmailRule
import { EmailRule } from "devextreme/common"
Type:
DevExtreme components use the following Email pattern:
- pattern: /^[\d\w._-]+@[\d\w._-]+\.[\w]+$/i
See Also
message
Type:
Default Value: 'Email is invalid'
An error message can be specified as follows:
Hard-code the message
index.js- $(function() {
- $("#textBox").dxTextBox({ ... })
- .dxValidator({
- type: "email",
- message: "My custom message"
- });
- });
Hide the message
index.js- $(function() {
- $("#textBox").dxTextBox({ ... })
- .dxValidator({
- type: "email",
- message: ""
- });
- });
Display the editor's name in the message
index.js- $(function() {
- $("#textBox").dxTextBox({ ... })
- .dxValidator({
- name: "Mail address", // The error message will be "Mail address is invalid"
- validationRules: [{
- type: "email"
- }]
- });
- });
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.