LHNCBC / lforms

See the project website at http://lhncbc.github.io/lforms/, or view the demo website at https://lhcforms.nlm.nih.gov/lhcforms.
Other
99 stars 55 forks source link

Lform is not validating fields when using time as datatype #127

Open ddjain opened 1 year ago

ddjain commented 1 year ago

When we validate the lfrom time field its not validating/ not returning null

here is my json { "item": [ { "type": "time", "linkId": "request-time-setting", "text": "Send messages at ", "required": true }, { "type": "choice", "linkId": "request-time-interval", "text": "Remind me to send data", "required": true, "answerOption": [ { "valueCoding": { "code": "0", "display": "Every day" } }, { "valueCoding": { "code": "2", "display": "Every 2 days" } }, { "valueCoding": { "code": "3", "display": "Every 3 days" } }, { "valueCoding": { "code": "7", "display": "Once a week" } } ], "initial": [ { "valueCoding": { "code": "0", "display": "Every day" } } ] } ], "resourceType": "Questionnaire", "title": "My Preferences ", "status": "draft" } Getting below suggestion in my code. DeepinScreenshot_select-area_20230511194350

plynchnlm commented 1 year ago

I think the issue is that you are using answerOption.valueCoding on a field with type="time". If you are using version 33.0.0 or greater, you should be able to use answerOption.valueTime.