Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Controller */
- public function checkKategori($param){
- if ($param == '#') {
- $this->form_validation->set_message('checkKategori', 'Nama Kategori belum dipilih.');
- return FALSE;
- }else{
- return TRUE;
- }
- return TRUE;
- }
- /* Model */
- public function getValidationRules(){
- $validationRules = [
- [
- 'field' => 'Cmb_KategoriBarang',
- 'label' => 'Kategori belum dipilih',
- 'rules' => 'trim|required|callback_checkKategori'
- ]
- ];
- return $validationRules;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement