Server Validation "Show Region If"
I have a form with a HTML Editor on it, if I try to submit the form without entering a value the form fails but the show region if doesn't seem to trigger. No error message is displayed.
Here is the server validation code, the field name is "ProductShortDesc":
<?php
if ((isset($_POST["Insert"]) || isset($_POST["Insert_x"]))) {
$WAFV_Redirect = "".(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)) ."?invalid=true";
$_SESSION['WAVT_productsinsert_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ((isset($_POST["ProductSKU"])?$_POST["ProductSKU"]:"") . "",true,1);
$WAFV_Errors .= WAValidateUnique(("PowerMailerConnection"),$PowerMailerConnection,$database_PowerMailerConnection,"products","ProductID","none,none,NULL","0","ProductSKU","',none,''","".((isset($_POST["ProductSKU"]))?$_POST["ProductSKU"]:"") ."",true,2);
$WAFV_Errors .= WAValidateRQ((isset($_POST["ProductName"])?$_POST["ProductName"]:"") . "",true,3);
$WAFV_Errors .= WAValidateNM((isset($_POST["ProductPrice"])?$_POST["ProductPrice"]:"") . "","","",2,"",true,4);
$WAFV_Errors .= WAValidateNM((isset($_POST["ProductWeight"])?$_POST["ProductWeight"]:"") . "","","","",",.",true,5);
$WAFV_Errors .= WAValidateRQ((isset($_POST["ProductShortDesc"])?$_POST["ProductShortDesc"]:"") . "",true,6);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["CategoryID"]))?$_POST["CategoryID"]:"") . "",true,8);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["SubCategoryID"]))?$_POST["SubCategoryID"]:"") . "",true,9);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"productsinsert");
}
}
?>
Here is the "Show Region If" code:
<?php
if (ValidatedField('productsinsert','productsinsert')) {
if ((strpos((",".ValidatedField("productsinsert","productsinsert").","), "," . "6" . ",") !== false || "6" == "")) {
if (!(false)) {
?>
<span class="serverInvalidState" id="ProductShortDesc_ServerError">Please enter a short description.</span>
<?php //WAFV_Conditional products_insert.php productsinsert(6:)
}
}
}?>