Welcome Guest, Not a member yet? Register   Sign In
Validation error message is missing the field name
#3

[eluser]SouthOfZeeland[/eluser]
Controller:
Code:
$rules["title"] = "required|max_length[255]";
$this->validation->set_rules($rules);

$fields["title"] = $this->input->post("title");
$this->validation->set_fields($fields);

if ($this->validation->run() == FALSE) {
   //load view and so on
}

View:
Code:
<?php echo $this->validation->error_string; ?>
            
<p><label for="title">Title</label>
&lt;input type="text" name="title" id="title" size="100" value="&lt;?php echo $this-&gt;validation->title; ?&gt;" /></p>

That's my code. The value in the lang-file is
Code:
$lang['required'] = "The %s field is required.";


Messages In This Thread
Validation error message is missing the field name - by El Forum - 11-04-2007, 05:26 AM
Validation error message is missing the field name - by El Forum - 11-04-2007, 06:40 AM
Validation error message is missing the field name - by El Forum - 11-04-2007, 06:50 AM
Validation error message is missing the field name - by El Forum - 11-04-2007, 07:16 AM
Validation error message is missing the field name - by El Forum - 11-04-2007, 08:18 AM
Validation error message is missing the field name - by El Forum - 11-04-2007, 08:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB