Input Codeigniter Fungsi yang Diperlukan dalam PHP

// THIS HELPER METHOD SANITIZES INPUT FIELDS AND MAKE SURE THAT IT IS NOT EMPTY
function required($input = '')
    {
        $trimmed_value = trim($input);
        if (strlen($trimmed_value) > 0) {
            return $trimmed_value;
        } else {
            error(get_phrase('required_fields_can_not_be_empty'), $_SERVER['HTTP_REFERER']);
        }
    }
Codelone