Simple validation

This is only client-side simple javascript validation. You can use default presets or create your own RegExp.


public function simple_validation()
{
  $xcrud = get_xcrud();
  $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);
    
  $data['content'] = $xcrud->render();
  
  return view('demos', $data);
}

Employees

#LastnameFirstnameExtensionEmailOfficecodeReportstoJobtitle 
1MUrrDianeCC123ty89cvcvthyht@hh.com2855President6
2GerardMartinx2312ty89cvcvthyht@hh.com4Sales Rep
3Chieni5Patrickfgjhjpchieni@gmail.com4VP Marketing
4YgyGggFgbj7@hj.com15Ff
5DARA2DATRATRETANTAdara@gmail.com5454GIGIONE
6aaabbb dfghjklaaa@aa999a.com3aaa
7
8
9
Search