Welcome Guest, Not a member yet? Register   Sign In
Form Error : Remove 'The' Word from Error
#1

[eluser]npCoda[/eluser]
Hello!
I am beginner to Code Igniter. Recently I am working in form validation. I am using form validation error to check the error.

Code:
$this->load->library('form_validation');
    
     $this->form_validation->set_rules('user_full_name', 'Name', 'trim|required|min_length[5]|max_length[50]|xss_clean');
  $this->form_validation->set_rules('user_email', 'Email', 'trim|required|valid_email');
     $this->form_validation->set_rules('comment', 'Suggestion limited to 255', 'trim|max_length[255]|xss_clean');
  
     if ($this->form_validation->run() == FALSE)
  {
  $this->session->set_flashdata(array('error_message'=>validation_errors()));
   redirect($this->session->userdata('current_url'),'refresh');
  }


My requirement :

When error is displayed,it shows:
The Name field is required.
The Email field is required.


How can I remove 'The' from the error. Just I want to display as 'Name is required'

I tried to search the text in system/libraries/Form_validation.php file and remove 'The' word but could not get.

Can someone suggest me?
Thank you for you time.




Messages In This Thread
Form Error : Remove 'The' Word from Error - by El Forum - 05-15-2012, 09:48 PM
Form Error : Remove 'The' Word from Error - by El Forum - 05-15-2012, 09:59 PM
Form Error : Remove 'The' Word from Error - by El Forum - 05-15-2012, 10:00 PM
Form Error : Remove 'The' Word from Error - by El Forum - 05-16-2012, 12:12 AM
Form Error : Remove 'The' Word from Error - by El Forum - 05-16-2012, 04:06 AM
Form Error : Remove 'The' Word from Error - by El Forum - 05-16-2012, 04:55 AM
Form Error : Remove 'The' Word from Error - by El Forum - 05-24-2012, 11:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB