[eluser]Matthew90[/eluser]
Hey,
I use the validation class for a form.
Like in the example I use in the controller:
Code:
$rules['laufzeit'] = "exact_length[2]";
$rules['geldbetrag'] = "required|callback_betrag_check";
$rules['wagen'] = "required";
$rules['email'] = "required";
$this->validation->set_rules($rules);
if ($this->validation->run() == FALSE)
{
$this->layout->buildPage("versicherungsrechner/uebersicht", $data);
}
else
{
$this->layout->buildPage("versicherungsrechner/uebersicht", $data);
}
and for the view I use:
Code:
<?=form_open("versicherungsrechner_ergebnisse")?>
//some code
//line 25 follows...
<input type="text" name="email" value="<?=$this->validation->email;?>" size="50" />
</form>
And the result of this is:
Quote:A PHP Error was encountered
Severity: Notice
Message: Undefined property: CI_Validation::$email
Filename: versicherungsrechner/uebersicht.php
Line Number: 25
I have no more idea how to fix it...in fact it´s like in the example.
Does someone have an idea??
greetings
Matthias