complex server validation
Hello all,
I have a complex form with a select.
If the user select a specific select option, another two fields (Field1 and Field2) are displayed (I use Jquery to handle hidden divs).
So, I need to validate the additional fields only if they are displayed.
And if they are displayed I should check if the user enters the correct values in both fields.
Example: if Field1 is < 100 and Field2 is < 200 validation should fail and an error message should be displayed.
I'm currently using this server variable but it's not working:
Validation type: number (international, min: 0; max: empty; decimals: 0)
Validation server:
(((isset($_POST["myselect"]) && $_POST["myselect"] == "8") && ($_POST["field1"] <100 && $_POST["field2"] <200))?$_POST["field1"]:"-1")
How can I intercept this error?
TIA
tony