Extended form_validation: now with file checking :) |
[eluser]devbro[/eluser]
I have been thinking of doing this for a long time and finally did ![]() http://devbro.com/testing/ci_form_validation/ I extended the form_validation to now have ability to check $_FILES (file uploading). here is the way it can be used: Code: $this->form_validation->set_rules('image','Image','file_required|file_size_max[500]|file_allowed_type[image]'); I added 3 set of rules so far: 1. file_required: same as required 2. file_size_max: define maximum file size in KB 3. file_allowed_type: what type of file to expect. So what do you think? is there any way to improve it further? |
Welcome Guest, Not a member yet? Register Sign In |