2
votes

I have a simple form which has only two(email, password) fields. I'm using codeigniter's form validation library to validate that form. And it's working fine, but not the way I wanted to.

I want to show only one error message when email or password field empty. or when both fields are empty. not two error messages for each fields.

How can I do that in codeigniter using it's form_validation library.

1

1 Answers

-2
votes

Use form_error() function http://www.codeigniter.com/user_guide/libraries/form_validation.html look up Showing Errors Individually