I have a Select field and then a follow-up Number that shows only if option 1 is selected in the Select. I'm trying to make the Number field required only if it is displayed. I've tried a few ways of writing the validation, but I can't figure out how to get it to require the Number. What I have right now:
select_field==0 || (select_field==1 && number_field>0)
I can get it to work with a Text field by saying number_field.length>0, but the same doesn't seem to work for Numbers.
Alternately is there a way to dynamically change the required property, rather than looking at the value of the number field?
Please sign in to leave a comment.