We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Email Validation

Hi

It's possible email validation for textbox?  

 $("#email").ejMaskEdit({ name: "mask", inputMode: ej.InputMode.Text, maskFormat: " " });

maskformat...?

Thanks
Pratheep

5 Replies

SN Sasikala Nagarajan Syncfusion Team August 27, 2015 02:17 PM UTC

Hi Pradheep,

Thanks for using Syncfusion products,

We have analyzed your requirement and prepared the simple sample based on this. Please get the sample from below location

http://jsplayground.syncfusion.com/ommwdq0f

In this sample, we have provided the mask format as "AAAAAA@AAAA.AAA" . Length of AAA is depend on how much character you want to enter as user name and domain name.

Also, to validate the email id, we have used regular expression in client side event focusOut ( will triggered when we focus out from the mask edit control) of mask edit control. So please check with the given sample and let us know if you have further queries,

Regards,
Sasikala Nagarajan



PR Pratheep August 27, 2015 10:09 PM UTC

HI

Thanks for you  replay 

domain and user name  character length  limitation  ?

Thanks

Pratheep





SN Sasikala Nagarajan Syncfusion Team August 28, 2015 09:48 AM UTC

Hi Pratheep,
Yes, using mask format we can specify the limited length of characters only to the username and domain name format.
Please let us know if you have further queries,
Regards,
Sasikala Nagarajan


PG Pramod Gaikwad January 7, 2016 06:47 AM UTC

Hello,

I Want email validation for syncfusion javascript grid for perticular column..

so please reply me as early as possible


SR Sellappandi Ramu Syncfusion Team January 8, 2016 09:04 AM UTC

Hi Pramod,

Thanks for contacting Syncfusion support.

We have the validationRules property in column level to enable the validation in particular column.

Please refer to the code example, playground sample and online help documentation,

$(function () {

    window.gridData = [

                                                . . . .

                                                ]

    $("#Grid").ejGrid({

        // the datasource "window.gridData" is referred from jsondata.min.js

        dataSource: window.gridData,

        allowPaging: true,

        editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true },

        toolbarSettings: { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Add, ej.Grid.ToolBarItems.Edit, ej.Grid.ToolBarItems.Delete, ej.Grid.ToolBarItems.Update, ej.Grid.ToolBarItems.Cancel] },

        columns: [

                { field: "EmployeeID", isPrimaryKey: true, headerText: 'Employee ID', textAlign: ej.TextAlign.Right, validationRules: { required: true, number: true }, width: 90 },

                { field: "EmployeeName", headerText: 'Employee Name', validationRules: { required: true, minlength: 5 }, width: 90 },

                { field: "Age", headerText: 'Age', textAlign: ej.TextAlign.Right, editType: ej.Grid.EditingType.Numeric, validationRules: { required: true, range: [10, 60] }, width: 80 },

                { field: "Email", headerText: 'Email', validationRules: { required: true, email: true }, width: 150 }

        ]

    });


});


Sample Link: http://jsplayground.syncfusion.com/ej2oy04n

Documentation: http://help.syncfusion.com/js/grid/editing#column-validation

Regards,
Sellappandi R

Loader.
Live Chat Icon For mobile
Up arrow icon