How to impose a global maximum limit on two webform number fields? I'm using a webform as an online reservation form.
Apart from the name, email and phone number fields, there are two number fields to ask how many adults and how many children will be attending an event.

The thing is we want to restrict the online reservation to 8 participants (adults and children combined)
For example : It can be 8 adults or 4 adults and 4 children or 6 adults and 2 children etc..

Is there a way to use some sort of rule to impose this ?
thanks
Install the Webform Validationmodule which allows you to easily set rules for fields. So in this case you could add a rule that the number can not go above 8.

You can also use hooks to add your own validation rules in code for more complex formulas like the child and adult combination.