Welcome Guest, Not a member yet? Register   Sign In
Form Validation question
#1

[eluser]macleodjb[/eluser]
I was running through the user manual on form validation and i was trying to have a rule use my own query as well as perform a check for required.

Code:
$rules['dname'] = "required|callback_check_displayname($email)";

I entered a name that i knew would error the call back so i could check my error message, and instead it did not error, and proceeded. So i guess my question is this the proper way to do this?

Secondly, how do you get two uri fields behind the url like codeigniter does. (see below)

like this www.ellislab.com/forums/viewforum/{forum id}

Do i need to create a sub folder under "controllers" called "forums" and then place a controller within this folder called "viewforum"?

I have my function added via a model in my controller, does my function need to live inside my controller?
#2

[eluser]Colin Williams[/eluser]
I think you are frustratingly confused. How much of the user guide have you read?

If these forums were built on CI (which they are not) then 'forums' would be the controller, 'viewforum' or 'viewthread' would be the function, and the third param would be the id. Amazingly (not really) this plays right into CIs URI convention of /controller/function/id




Theme © iAndrew 2016 - Forum software by © MyBB