Welcome Guest, Not a member yet? Register   Sign In
What do form validation errors return as when empty?
#1

[eluser]ShoeLace1291[/eluser]
I want to show my form validation errors indivudually and i was wondering... do empty validation errors return as blank strings, or as FALSE?
#2

[eluser]sith4life[/eluser]
Code:
echo form_error('field_name');
is all you need to ouput the errors providing the validation rules are set up correctly.

refer to http://ellislab.com/codeigniter/user-gui...ation.html for more info
#3

[eluser]Aken[/eluser]
Empty strings.

I'd suggest poking through the source code yourself to see how it works. Helps you learn and answers your question.
#4

[eluser]jakelehner[/eluser]
You could also probably use the php function gettype figure that out pretty quick.

http://php.net/manual/en/function.gettype.php




Theme © iAndrew 2016 - Forum software by © MyBB