Complex validation |
[eluser]bewhite[/eluser]
Hello! I have small problem with validation of my form. I have to check if at least one field from the set contains data. I have looked at the user defined functions inside validation library but I still don't understand how can I create function that will process data from several field. Does anybody know how to do this? Maybe I have to use another CI library or class in my case? Thanks
[eluser]xwero[/eluser]
I have suggested a validation library extension to add rules in this thread and i think this is one of the rules that are common enough to put in the repository (if there ever is going to be one). I would suggest something like Code: // controller
[eluser]bewhite[/eluser]
I think that the best variant for me will be my own validation. Fortunatelly, I will use it only in one place of the code so I don't need even to create a function. I don't want to dig inside standard libraries because I will have problems with CI updates later.
[eluser]xwero[/eluser]
In the same thread you can find a solution for that too but the thread owner wanted another way to validate.
|
Welcome Guest, Not a member yet? Register Sign In |