kobotoolbox / enketo-express

We've moved! Please use the new repository 🠊 https://github.com/enketo/enketo-express
Apache License 2.0
102 stars 90 forks source link

OC only: validator appearance validation tweaks #1050

Closed MartijnR closed 6 years ago

MartijnR commented 6 years ago

Appearance "horizontal-compact" for question "temp_units" is deprecated, use "compact" instead Question found in body that has no ref attribute Appearance "analog-scale" for question "vas_question" is not supported Appearance "vertical" for question "vas_question" is not valid for this question type (input) Result: Invalid

I got the error message above with my standard demo form. As Krikor mentioned, we need the warning for the deprecated appearance to be suppressed. Also, "analog-scale" and "vertical" (and "no-ticks" from Krikor's screenshot) are valid for us for an integer item.

It looks like "Result: Invalid" is also coming through as part of this message. I'm not sure if that can be suppressed on your end or if we need to suppress it from displaying in this message when there is a validator error.

MartijnR commented 6 years ago
MartijnR commented 6 years ago

Thanks @pbowen-oc ;)

The last one is intriguing. Can you please send the XForm so I can check what the error is?

MartijnR commented 6 years ago

Just in case it is a bug, I'm holding off on the release of the new enketo-validate (but the fixes are in latest master)

MartijnR commented 6 years ago

All done in version 1.4.0. The form you sent now provides this feedback when run in --oc mode if the validation is run after XForm manipulation (that e.g. adds the "no-collapse" appearance):

Appearance "no-collapse" for question "ae_rg" is not valid for this question type (repeat).

Appearance "auto-complete" for question "AEBL1" is not supported.

Appearance "no-collapse" for question "VITALS_RG" is not valid for this question type (repeat).

Appearance "multiline" for question "colors" is not valid for this question type (select).

Appearance "no-collapse" for question "DINNER" is not valid for this question type (repeat).

Appearance "no-collapse" for question "DINNER2" is not valid for this question type (repeat).
pbowen-oc commented 6 years ago

@MartijnR - How come "no-collapse" is not valid for repeating groups? It thought those can be collapsed if the "no-collapse" appearance is not used.

MartijnR commented 6 years ago

They don't do anything on repeats, only on groups. I think the code that adds them is too aggressive as it adds them to both.

MartijnR commented 6 years ago

Note: for a repeat pyxform creates both a <group>and a <repeat>.