CodeIgniter Forums
Form errors not showing. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Form errors not showing. (/showthread.php?tid=41012)

Pages: 1 2


Form errors not showing. - El Forum - 04-26-2011

[eluser]InsiteFX[/eluser]
Take the comma of the end of this!
Code:
$this->data['email'] = array('name' => 'email',
    'id' => 'email',
    'type' => 'text',
    'value' => $this->form_validation->set_value('email'), // Romove comma! end of array no comma
);

$this->data['password'] = array('name' => 'password',
    'id' => 'password',
    'type' => 'password', // Remove comma! end of array no comma
);

InsiteFX


Form errors not showing. - El Forum - 04-27-2011

[eluser]toopay[/eluser]
[quote author="austintbiggs" date="1303885378"]Oh, my bad I put that in the view for some reason, I pieced it in, but still nothing. no errors, but nothing gets printed.[/quote]
What happened if you do this...
Code:
if(function_exists('validation_errors'))
{
   var_dump(validation_errors());
   exit;
   $this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');
}
else
{
   die('The function validation_errors() is unaccessible!');
}



Form errors not showing. - El Forum - 04-27-2011

[eluser]InsiteFX[/eluser]
Did you try using keep_flashdata ?

And you did load the session library right?

InsiteFX


Form errors not showing. - El Forum - 04-27-2011

[eluser]austintbiggs[/eluser]
I made a really stupid mistake and the form wasnt validating because I had made the variables equal to each other which messed up the validation. Thanks everyone!