Simple validation
This is only client-side simple javascript validation. You can use default presets or create your own RegExp
HIDE CODE
<?php $xcrud = Xcrud::get_instance(); $xcrud->table('employees'); $xcrud->validation_required('lastName',2)->validation_required('firstName',2)->validation_required('jobTitle'); $xcrud->validation_required('email'); $xcrud->validation_pattern('email','email')->validation_pattern('extension','alpha_numeric')->validation_pattern('officeCode','natural'); $xcrud->limit(10); echo $xcrud->render(); ?>
Employees
# | Lastname | Firstname | Extension | Officecode | Reportsto | Jobtitle | ||
---|---|---|---|---|---|---|---|---|
1 | View Edit Remove | |||||||
2 | View Edit Remove | |||||||
3 | View Edit Remove | |||||||
4 | 8 | View Edit Remove | ||||||
5 | Fausto | Herrera | Roi_4 | herrera.fausto@myoffice.com | 8 | View Edit Remove | ||
6 | Herrera | Fausto | Roi_4 | faustoherrera@outlook.com | 7 | View Edit Remove | ||
7 | View Edit Remove | |||||||
8 | View Edit Remove | |||||||
9 | View Edit Remove | |||||||
10 | asdasd | asdasd | asdasd | Meerasdasd.2007@Yahoo.com | 7 | asdasdasd | View Edit Remove |