Welcome Guest, Not a member yet? Register   Sign In
How to call a form validation callback function not tied to a field?
#1

[eluser]heat23[/eluser]
I have a form with several fields that I run validations on but I also want to validate some info from a database. How can I use the set_rules() to call my own callback functions but not tie it in to a particular field?
#2

[eluser]TheFuzzy0ne[/eluser]
Any validation method has access to all of the post array, so that shouldn't be a problem. The only problem is reporting errors, since that has to be tied to a single field. But there's nothing stopping you from having your custom validation call back from setting specific properties on your controller for you to access.




Theme © iAndrew 2016 - Forum software by © MyBB