Welcome Guest, Not a member yet? Register   Sign In
Validation Callback Not Being Called
#1

[eluser]Dirigible[/eluser]
Hi all,
My callback function from validation rules isn't being called
The other validation rules for that field ARE being called -- (required|max_length[12]|alpha_dash)
but not my callback __check_login_name

Full code: $rules['login_name'] = "required|max_length[12]|alpha_dash|callback__check_login_name";

Thanks!
#2

[eluser]JoostV[/eluser]
There's two underscores in callback__check_login_name. Did you name your callback function _check_login_name?
#3

[eluser]Dirigible[/eluser]
yes.
#4

[eluser]JoostV[/eluser]
Strange. Have you tried renaming it to check_login_name and calling it via callback_check_login_name?

To check whether or not the callback was called you can log a debug message
Code:
log_message('debug', 'check_login_name was called')
#5

[eluser]Dirigible[/eluser]
yep. tried that too =/. It looks very similar to the examples...
#6

[eluser]JoostV[/eluser]
Can you post your code, please?
#7

[eluser]flaky[/eluser]
are you using HMVC?




Theme © iAndrew 2016 - Forum software by © MyBB