I'm struggling with something, maybe you know the solution!
I would like to have a form, which is divided in more pages. The user fills in his/her username / password on the first page, then clicks 'next' and fills in the next on page 2 and so on. On the last page, the user needs to get all the information filled in and at last save it to the database. No problem so far, i just store all the data in a session. And everytime i redirect to a new page i store new data in the session. At the last page I get all the data and show it, and save this data to the database.
But what if i want to validate this data each time for each page? If I build a validation function in my user model, it validates every field every time, but I just want it for some fields that are just on that page, and show their errors on that page...
Ofcourse I could build more functions in my model, so that every page has his own validation, but in the future i would use it for other elements, so that's not the best solution..
Do you know what to do?