Queries |
Properties | |
required field |
e-validationrules-required="true" | |
range validation like be between 1 and 16 |
e-validationrules-range="range" angular.module('employeeView', ['ejangular']) .controller('GridCtrl', function ($scope) { $scope.tools = ["add", "edit", "delete", "update", "cancel"]; $scope.page = 2; $scope.data = obj; $scope.range = [0, 5]; | |
Is the user prevented from entering alphabetical characters |
e-validationrules-number="true" | |
field validated to be mandatory and between 1 and 128 characters |
e-validationrules-maxlength="16" e-validationrules-minlength="5" While using maxlength we are facing the issue with “MaxLength and Minlength property is not working fine in Angular JS”. We have confirmed this as a defect and logged a defect report. So, We have created support incident under your account to track the status of this requirement. Please log on to our support website with the below link to check for further updates, https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents Please find the following code snippet :
But we have provided a workaround by changing the observables. | |
how to make option field means do not want to apply validation |
Please remove the validation property from the column | |
validation errors displayed accordingly and the user prompted to correct them ( i.e. is there an error message and is the focus put back on the field generating the error |
No, It will not remove the validation until the user changes it correctly. | |
Are preceding/trailing spaces trimmed from the entry in any field prior to validation? |
Yes, it takes an entry while giving space in the entries. |
<div ng-app="employeeView"> <div ng-controller="GridCtrl"> <div ej-grid id="Grid" e-width="500px" e-datasource="data" e-allowsorting="true" e-allowPaging="true" e-toolbarsettings-showtoolbar="true" e-toolbarsettings-toolbaritems="tools" e-editsettings-allowdeleting=' true' e-editsettings-allowediting='true' e-editsettings-allowadding='true' > <div e-columns> <div e-column e-field="EmployeeID" e-headertext="Employee ID" e-isprimarykey="true" e-textalign="right" e-validationrules-range="range" e-validationrules-number="true"></div> <div e-column e-field="LastName" e-headertext="Last Name" e-textalign="right"></div> <div e-column e-field="FirstName" e-headertext="First Name" e-textalign="right" e-validationrules-required="true" e-validationrules-maxlength="16" e-validationrules-minlength="5"></div> <div e-column e-field="Title" e-headertext="Title" e-textalign="right" e-validationrules-required="true"></div> <div e-column e-field="City" e-headertext="City" e-textalign="right"></div> <div e-column e-field="Country" e-headertext="Country" e-textalign="right"></div> </div> </div> </div> |