Welcome Guest, Not a member yet? Register   Sign In
form_validation messes up the POST
#8

[eluser]theshiftexchange[/eluser]
[quote author="bargainph" date="1242897473"][quote author="theshiftexchange" date="1242896058"]
Sometimes you may not want to:

I sometimes dont want/need to validate a drop down list - because the 3-4 choices I give them are ALL valid - and the 'default' select on the drop-down list is what is selected 90% of the time. So why force a 'blank' validation rule to be run on the field?[/quote]

How can you be so sure that they are valid when POST can also be tampered with? I believe it's included in the "don't trust user input zone"

testing tamperingxxxxxxxxxx <-- tampered content[/quote]

I guess it depends on the level of security you want to provide for your site.

if you use $this->input-post() then you know it covered from a security point of view - and thats how I handle all my drop-down fields at the moment.

If I went ahead and created validation rules on all my dropdown menus it would only be something like trim|required|alpha-numeric - and your example would still get past my validation rule.

The only way I see to stop what your example is would be to create a _callback method for each dropdown - and have it compare the data posted to the data I displayed (as my drop-downs are often dynamically created) - and check at least one matches?


Messages In This Thread
form_validation messes up the POST - by El Forum - 05-20-2009, 03:25 PM
form_validation messes up the POST - by El Forum - 05-20-2009, 03:52 PM
form_validation messes up the POST - by El Forum - 05-20-2009, 03:55 PM
form_validation messes up the POST - by El Forum - 05-20-2009, 04:03 PM
form_validation messes up the POST - by El Forum - 05-20-2009, 07:16 PM
form_validation messes up the POST - by El Forum - 05-20-2009, 09:54 PM
form_validation messes up the POST - by El Forum - 05-20-2009, 10:17 PM
form_validation messes up the POST - by El Forum - 05-20-2009, 10:36 PM
form_validation messes up the POST - by El Forum - 05-20-2009, 10:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB