Questions: allow age to be missing

This commit is contained in:
TEC 2022-10-17 21:40:07 +08:00
parent f58858fea7
commit aab338ce17
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 2 additions and 1 deletions

View File

@ -260,7 +260,8 @@ the questions you see now will not necessarily be in the final survey.",
SurveyPart("Demographics (all questions are optional)",
IntegerInput(:respondent_age,
"How old are you?",
validators = n -> if n < 8
validators = n -> if ismissing(n) # This is fine, the question is optional.
elseif n < 8
"My, you're advanced for you're age. <i>Suspiciously</i> advanced…"
elseif n > 99
"Congratulations on becoming a centenarian! How about you get one of your grandchildren to do this survey instead?"