Stream: questionnaire
Topic: Further restrictions on answer data type
Morten Ernebjerg (May 27 2020 at 12:16):
Hi :wave: We are looking at restricting the format of specific answers beyond just the type
- e.g things like restricting a date
entry to be a year only and restricting a string
postal code to a specific format. As far as I can tell, the only thing that can be directly restricted is the length (maxLength
), otherwise one has to use extensions like the regex one. I was wondering to what extent the validator actively enforces such further constraints. E.g. are extensions "actively" supported, in the sense that it will e.g. evaluate the regex and cause an error if it does not match the entry in a QuestionnaireResponse
?
Lloyd McKenzie (May 27 2020 at 13:54):
The intention is that the validator should support all of the core extensions (and will eventually support all of the Structured Data Capture (SDC) IG extensions as well. However, it's possible there are some that aren't yet enforced. If you find any that aren't handled correctly, submit a change request (ideally along with a test case) and we'll get the validator fixed.
Morten Ernebjerg (May 27 2020 at 14:19):
Thanks, good to know. I didn't actually get to testing it yet but I will report if I find smt. missing.
Grahame Grieve (May 28 2020 at 00:22):
I think regex is supported already
Last updated: Apr 12 2022 at 19:14 UTC