How do I use a logical operator in codeigniter form validation rules
I have this code
$this->form_validation->set_rules('company_name', 'First name', 'trim|required');
which checks only one field. I have two fields: 1- company_name 2- username
what I want to do is something like this return true if either field if filled.
set_rules('company_name', 'Company Name' || 'username', 'User Name', 'trim|required'); (this will not work )
how do I achieve this using codeigniter form validation with || Or Logical Operator