close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Form Validation working incorrectly for file size

Thread began 1/23/2012 3:31 am by Rune Brynestad | Last modified 1/23/2012 9:36 am by Jason Byrnes | 898 views | 5 replies |

Rune Brynestad

Form Validation working incorrectly for file size

I am trying to validate 2 fields.

The first is a text field that I want to be required.
The validation works correctly.

The second is a file field that I want to validate for type of file and also for file size
If I try to upload a wrong file type the validation works.
But if I try to upload a file that is too large, the error message for file size does not show up.

I'm attaching my working file.

Regards
Rune

Attached Files
gavesoknader_Insert_forenklet.zip
Sign in to reply to this post

Jason ByrnesWebAssist

you are validating for less than 10 MB, what size file are you uploading?

I am testing your page on my system with a 18mb file and the validation is working fine.


to help troubleshoot, change:

php:
if ($WAFV_Errors != "")  {

    PostResult($WAFV_Redirect,$WAFV_Errors,"gavesoknaderInsert_110");
  }



to:

php:
if ($WAFV_Errors != "")  {

        die("<pre>".var_dump($_FILES)."</pre><br /><br/>".$WAFV_Errors);
    PostResult($WAFV_Redirect,$WAFV_Errors,"gavesoknaderInsert_110");
  }



and post back the results of a large upload.

Sign in to reply to this post

Rune Brynestad

I'm validating a 26 MB file.

The output when I modify the code are:

array(0) { }



,1

When you test on your system with a 18mb file, do you see the error message "Maximum file size is 10 MB" ? I don't.

Regards
Rune

Sign in to reply to this post

Jason ByrnesWebAssist

yes, i do see the "Maximum file size is 10 MB" error message when testing on my system


the results you posted mean that you did not enter anything for the required text box.

make sure to fill in the text box and upload a file when testing.

Sign in to reply to this post

Rune Brynestad

Sorry Jason, but I have a value in the required text box. Still the same output.

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...