KoolGrid - Powerful PHP GridKoolGrid - Powerful PHP GridFullVersion 5.7.0.1 released on 05/19/2017

Validation - Insert/Edit Validation

*Note: When editing or inserting row, you may test putting non-integer to CustomerNumber field or leave other input fields empty.
CustomerNumber 
CustomerName 
Phone 
City 
 
4
6
555aaa
7
12
xcv
1234567890
city
121
Baane Mini Imports
07-98 9555
Stavern
124
Mini Gifts Distributors Ltd.
4155551450
San Rafael
125
Havel & Zbyszek Co
(26) 642-7555
Warszawa
33333
aaa
aa
aaaa
8877
Mr.NoName
66775554433
Houston
129
Mini Wheels Co.
6505555787
San Francisco
131
Land of Toys Inc.
2125557818
NYC
141
Euro+ Shopping Channel
(91) 555 94 44
Madrid
Page 1 in 13, items 1 to 11 of 123.
* Note:Generate your own grid with Code Generator

Description & Sample code

This example shows you how to add validator to grid column. The validator will ensure the input from user is correct before doing data operation task. In above example, we have used RequiredFieldValidator and RegularExpressionValidator. The RequiredFieldValidator make sure that input from user is not empty. And the RegularExpressionValidator helps to ensure the input for customerNumber is integer.

Together with above two validators, there are other two validators: RangeValidator and CustomValidator, all cover full range of grid input validation.