Input = file validation on multipart form |
[eluser]Linderman[/eluser]
Hello! I validate only 1 fields because of the example. In my life project , the form is big and the file input is required. The question is not why i validate only 1 field using the corresponding class , the question is how to validate file input using normal way? [quote author="steelaz" date="1272150655"]I don't think you can validate file input with form_validation library, it checks $_POST array whereas uploaded file information is located in $_FILES array. You can use file upload library to check if file was uploaded or try JavaScript to validate it.[/quote] yes this is right [quote author="Aken" date="1272246954"]Create your own callback rule during forum validation, and use it to check the relevant file data. http://ellislab.com/codeigniter/user-gui...#callbacks[/quote] and yes , this will do the thing Thank You guys for the answers, it helps a lot! |
Messages In This Thread |
Input = file validation on multipart form - by El Forum - 04-24-2010, 08:56 AM
Input = file validation on multipart form - by El Forum - 04-24-2010, 12:10 PM
Input = file validation on multipart form - by El Forum - 04-25-2010, 02:55 PM
Input = file validation on multipart form - by El Forum - 04-25-2010, 08:16 PM
Input = file validation on multipart form - by El Forum - 04-26-2010, 12:25 AM
Input = file validation on multipart form - by El Forum - 04-29-2010, 11:00 AM
|