Email Validation
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 "[email protected]" . 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
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
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
- 5 Replies
- 4 Participants
-
PR Pratheep
- Aug 26, 2015 04:40 AM UTC
- Jan 8, 2016 09:04 AM UTC