I have a form where there's an option group with the choice of entering a value in pounds or a percentage.
Following this I have an input box for the actual value or the percentage.
I want to use the validate functions in jquery to set a conditional maximum value (e.g.100) if the user chooses the percent option.
Is this possible - I tried this but it doesn't work:
sponsorValue: {
required: true,
digits: true,
max: function(element) {
if ($("#sponsorOption").val() == '2'){ return 100;}
}
}
can anyone offer any help?