[eluser]gtech[/eluser]
[quote author="AtlantixMedia" date="1197504563"]thanks everybody for the heads up. basically, I intend to pass multiple rules, starting to test the most strict one. for example,
required|min_length[3]|max_length[8]
I test whether the input is null
1) if it is no more tests are done and a msg like 'sorry this field is required' is sent back.
2) if it's not, input is tested for min_lenght and so on until either it fails or passes all tests.
[/quote]
yep thats what happens I believe.
Quote:also, I would have to test a few rules which are not built in CI.
can this be implemented using CI validation library as is? thanks
yes read the documentation e.g. the bit that says "Callbacks: Your own Validation Functions"
sometimes the best thing to do is give it a go, cut and paste the examples.. test what happens and then if you get problems ask on the forum
. good luck!
Link to [url="http://ellislab.com/codeigniter/user-guide/libraries/validation.html"][Validation Docs][/url]