Welcome Guest, Not a member yet? Register   Sign In
validation callback


i have two fields and i need to output a error based on the fields data.
something like the passwords that have to be equal but i don't need them to be eaqual but respect a custom relation.
how can i resolve this using a callback function ? i need to call callback_myfunc($param1,param2) to be able to compare the two values. or any other method to do this ?

thanks in advance for any response

[eluser]Pascal Kriete[/eluser]
Put the callback rule on the second field. The parameter to the callback function will be the content of that field. The other one you get using $this->input->post('fieldname');

Does that help?

yea i did like u said but would had been nice to have a special function for something like this.
like if is used the same function in 3 rules the function to get the 3 values and so on

[eluser]Derek Allard[/eluser]

James Gifford proposes a very elegant solution.

Theme © iAndrew 2016 - Forum software by © MyBB