title: codeigniter custom form validation error messages
body: <pre><code>$this-&gt;form_validation-&gt;set_message('is_date', 'You must enter a valid date.');
  $this-&gt;form_validation-&gt;set_rules('loadingdate', 'Loading Date', 'required|is_date|xss_clean');
  $this-&gt;form_validation-&gt;set_rules('departuredate', 'Departure Date', 'required|is_date|xss_clean');
  $this-&gt;form_validation-&gt;set_rules('arrivaldate', 'Arrival Date', 'required|is_date|xss_clean');
  $this-&gt;form_validation-&gt;set_rules('cutoffdate', 'Cut Off Date', 'required|is_date|xss_clean');
  $this-&gt;form_validation-&gt;set_rules('loadingdate', 'Loading Date', 'required|is_date|xss_clean');
  </code></pre>
  
  <p>I have created a custom form validation function called 'is_date' , which i have set a custom error message for.</p>
  
  <p>'You must enter a valid date.'</p>
  
  <p>How can I customise the error message  so that it displays the field name, since I have multiple fields which will use this validation? eg.</p>
  
  <p>'Loading Date must be a valid date.'
  'Cut Off Date must be a valid date.'</p>