[eluser]Stompfrog[/eluser]
Hi all,
I am half way through my first CI project and I am loving it. Just got to the validation class and think it is brilliant. The documentation for CI is very useful.
I do have one question tho.
As well as the specific error messages appearing next to each invalid input field I would like to put a generic error message at the top of my form.
Something along the lines of... "There appears to be a problem with your submission please see errors below".
I tried adding the following code to my view file...
Code:
if($this->validation->run() == FALSE)
{
//message here
}
...but this function always seems to return false even the first time the form is loaded, before a submission attempt is made. This means the generic error message always displays which is not good.
Is there any other existing logic I can use to achieve this or do i need to do something more complicated?
Thanks