Welcome Guest, Not a member yet? Register   Sign In
In array function in Validation library
#1

[eluser]Nielsk[/eluser]
Hey there,

I'm new here so hello first of all. I had a question because i'm working on my own portal. Is there a option in the "Validation lib" that checks if the value confirms with a value in the array.

I will use it to create a page system, so you can decide if you want 10, 20 or 50 pages for each page in a topic.

Maybe it could be transfered to a request because it's very handy for validation.

Niels Kootstra
#2

[eluser]Seppo[/eluser]
I don't think there is an option. You can use a callback for that purpose.
#3

[eluser]xwero[/eluser]
It would be nice to use validating functions from php but for that the way the run method is using php native methods as filters would have to change.

Most validating php functions return a boolean but there are functions like the strncmp function that returns zero if the match is correct and then there are functions you could use as validating functions like strpos, which returns FALSE if the string isn't found.
Because of this 'mess' it's better to be safe than sorry and don't use the php functions as validation rules.
#4

[eluser]Nielsk[/eluser]
[quote author="Seppo" date="1215446359"]I don't think there is an option. You can use a callback for that purpose.[/quote]
Thanks for the quick reply. I know how to create it but just want to know it for sure Smile




Theme © iAndrew 2016 - Forum software by © MyBB