Welcome Guest, Not a member yet? Register   Sign In
How can I validate a file upload using Form_validation?
#2

[eluser]Mike Ryan[/eluser]
[quote author="KeyStroke" date="1241032243"]Hi,

What other way could I use to validate file uploads with the form_validation library?

[/quote]

Hi,

The short answer is... don't! :-)

IMO the validation callback should really just *check* to make sure it is a valid upload, not actually do it. The callback can check if the uploaded file is valid (e.g. accepted file extension, not too big etc) and then your controller can save the uploaded file if it passed all of the validation rules.


Messages In This Thread
How can I validate a file upload using Form_validation? - by El Forum - 04-29-2009, 08:10 AM
How can I validate a file upload using Form_validation? - by El Forum - 04-29-2009, 10:00 AM
How can I validate a file upload using Form_validation? - by El Forum - 04-29-2009, 10:14 AM
How can I validate a file upload using Form_validation? - by El Forum - 04-29-2009, 10:36 AM
How can I validate a file upload using Form_validation? - by El Forum - 04-30-2009, 02:36 AM
How can I validate a file upload using Form_validation? - by El Forum - 05-04-2009, 02:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB