Your LimeSurvey version: 6.1.6+230703
Own server or LimeSurvey hosting: own server
Survey theme/template: bootswatch
==================
Hello fellow Limesurvey enjoyers.
I used a "Multiple choice with comments"-question with a javascript to hide the last 2 text fields and if either of the first two options are chosen they need a validation sum of 100, if neither of those options are chosen, the sum validation shouldn't trigger. I tried my hardest, but my lack of knowledge with regex and validation equation in general is showing. I got the sum check to work, but i don't know how to "deactivate" the sumcheck if the last 2 options are chosen.
I attached the lss for you all to check on my mediocre attempt.
The validation attempt:
"if(
(is_empty(f10b_1comment.NAOK) or regexMatch('/^[1-9][0-9]{0,4}$/', f10b_1comment.NAOK))
and
(is_empty(f10b_2comment.NAOK) or regexMatch('/^[1-9][0-9]{0,4}$/', f10b_2comment.NAOK))
, sum(f10b_1comment.NAOK, f10b_2comment.NAOK) == 100 or f10b_3=='Y' or f10b_4=='Y', ''
)
Thanks for the help in advance.