I'm attempting to shrink down my submit function for my codeigniter application and wanted to ask for any ideas on what I could do. This login form is submitted via jquery json.

Anybody have any thoughts on what I can do?

This is my old code:

http://pastebin.com/je0he2p6

This is what I am working with so far.
PHP Code:
public function form_is_valid()
{
    
$this->form_validation->set_rules('username''Username''trim|required|xss_clean|min_length[6]|max_length[12]|regex_match[/[a-z0-9]/]');
    
$this->form_validation->set_rules('password''Password''trim|required|xss_clean|min_length[6]|max_length[12]|regex_match[/[a-z0-9]/]');

    return 
$this->form_validation->run();
}

public function 
check_user_status($user_status_id)
{
    switch(
$user_status_id)
    {
        case 
1:

            break;
        case 
2:
            break;
        case 
3
            break;
        case 
4:
            break;
        case 
5:
            break;
    }
    return ;
}

public function 
submit()
{
    
$output_status 'Notice';
    
$output_title 'Not Processed';
    
$output_message 'The request was unprocessed!';

    if (
$this->form_is_valid())
    {

        
$output_status 'Success';
        
$output_title 'Form Submitted Successfully';
        
$output_message 'The form did validate successfully!';
    }
    else
    {
        
$output_status 'Error';
        
$output_title 'Form Not Validated';
        
$output_message 'The form did not validate successfully!';
    }

    echo 
json_encode(array('output_status' => $output_status'output_title' => $output_title'output_message' => $output_message'error_messages' => $this->form_validation->get_error_array()));