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
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

How to set “validationRules” property of columns in AngularJS

Platform: jQuery |
Control: ejGrid

How to set validationRules” property of columns in AngularJS


We can set all the standard validation methods of jQuery as a validation rules for columns. In the below table we have listed some of the jQuery validation methods and explain how to set these rules for columns in AngularJS




Requires an element.


Requires the element to be of given.


Requires the element to be of given maximum length.


Requires the element to be in a given value range.


The element requires a decimal number.


Requires the element to be in given value range


Please find more jQuery validation methods from the below UG documentation link

Link: https://help.syncfusion.com/js/grid/editing#column-validation

Please find the below code snippet:

<div ej-grid id="Grid" e-datasource="data" e-toolbarsettings="toolbar" e-editsettings = "editing">

        <div e-columns>

            <div e-column e-field="EmployeeID" e-headertext="Employee ID" e-isprimarykey ="true" e-validationrules-required="true" e-validationrules-number="true"></div>

            <div e-column e-field="LastName" e-headertext="Last Name"></div>

            <div e-column e-field="FirstName" e-headertext="First Name" e-validationrules-maxlength="16" e-validationrules-minlength="5"></div>

            <div e-column e-field="Title" e-headertext="Title" e-validationrules-range="range"></div>




        angular.module('listCtrl', ['ejangular'])

          .controller('EmployeeView', function ($scope) {

              $scope.data = window.employeeView,

              $scope.toolbar = { showToolbar: true, toolbarItems: ["add", "edit", "delete", "update", "cancel"] },

              $scope.editing = { allowEditing: true, allowAdding: true, allowDeleting: true },

              $scope.range = [0, 5]







You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile