Page 1 of 1

advanced validation

Posted: 2011-12-05 15:57
by antonio
Hi all,
still having problem with validation. sorry.
All I wanto to do seems easy:
I would like to throw an error if 5 fields are left to default.

Example:

field1: [0_______]
field2: [0_______]
field3: [0_______]
field4: [0_______]
field5: [0_______]
name: [_______]

this form should show an error if all field from field1 to field5 are equal to 0.
No error should be displayed if one or more of these field is different than 0.

Mathematically speacking (!): if the sum of field1+field2+field3+field4+field5 is 0 than display an error.
But is seems that validation trigger does't read expressions. Or perhaps I'm missing something.
Which is the correct format to use expression in validation trigger?

TIA for any helkp.

tony

Re: advanced validation

Posted: 2011-12-11 10:28
by Fred
Use the "Throw Error"
You can have multiple conditions to check for before it throws the error.

You will also be able to use : {POST.field1}+{POST.field2} == '0' as the condition.

Re: advanced validation

Posted: 2011-12-15 09:56
by antonio
Thanks Fred.
I really appreciate your help.

tony