Validation success not firing?
Hello,
I have the fail working but the success is not. Any reasons why?
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$WAFV_Redirect = "";
$_SESSION['WAVT_EmployeeDetails_705_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRX(((isset($_POST["textPass"]))?$_POST["textPass"]:"") . "","/^(?=.*\d)(?=.*\W).{8,20}$/",true,1);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"EmployeeDetails_705");
}
}
?>
<div class="row col-md-12">
<div class="col-md-6">
<label for="textPass">Your current password is:</label>
<input name="textPass" type="text" id="textPass" value="<?php echo($rsDetails->getColumnVal("password")); ?>" class="form-control">
<!-- TODO ADD Validation to make password secure -->
(requires 8-20 characters with 1 number and 1 special character such as: !@#$%^&*)
</div>
<?php
if (ValidatedField('EmployeeDetails_705','EmployeeDetails_705')) {
if ((strpos((",".ValidatedField("EmployeeDetails_705","EmployeeDetails_705").","), "," . "") >= 0)) {
if (!((strpos((",".ValidatedField("EmployeeDetails_705","EmployeeDetails_705").","), "," . "1" . ",") !== false || "1" == ""))) {
?>
<div class="alert-success col-md-6">Password Updated Successfully</div>
<?php //WAFV_Conditional Employee-Details.php EmployeeDetails_705(:1)
}
}
}?>
<?php
if (ValidatedField('EmployeeDetails_705','EmployeeDetails_705')) {
if ((strpos((",".ValidatedField("EmployeeDetails_705","EmployeeDetails_705").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
<div class="alert-warning col-md-6">Password did not update Successfully (requires 8-20 characters with 1 number and 1 special character)</div>
<?php //WAFV_Conditional Employee-Details.php EmployeeDetails_705(1:)
}
}
}?>
</div>