Ok so taking a verbose approach to my validation;
If the file size is between 1  - 50,000 Kb, upload to server
AND
If the image width is between 1 - 940 pixels, insert a record
If both these conditions are true during validation then the file should be uploaded and a record inserted.
Based on this, I have created the following WA Validation;
if (isset($_POST["nhSendUpload"]) || isset($_POST["nhSendUpload_x"]))  {
  $WAFV_Redirect = "";
  $_SESSION['WAVT_nhAddPhoto1_202_Errors'] = "";
  if ($WAFV_Redirect == "")  {
    $WAFV_Redirect = $_SERVER["PHP_SELF"];
  }
  $WAFV_Errors = "";
  $WAFV_Errors .= WAValidateNM(((isset($_FILES["nhImageUpload"]))?$_FILES["nhImageUpload"]["size"]:"") . "",1,50000,"",",.",true,2);
  $WAFV_Errors .= WAValidateNM(((isset($_FILES["nhImageUpload"]))?$_FILES["nhImageUpload"]["width"]:"")  . "",1,940,"",",.",true,1);
  if ($WAFV_Errors != "")  {
    PostResult($WAFV_Redirect,$WAFV_Errors,"nhAddPhoto1_202");
  }
}
This code sits above the WA insert and upload server behaviors.
I am uploading a .jpg file 40Kb in size and 620 pixels in width, both meet my validation criteria and should not fail.
I am creating a thumbnail at the same time, but it is not being validated.
For some reason the upload is failing on one or both validations
If i remove the validation behavior, the file uploads perfectly, so the issue lays with how the validation is constructed.
Have i understood this correctly?


