@LN related to this (and maybe to this), a choice filter that has a basic filter and an instance filter will upload with no validation errors, but the order of the basic filter can result in a form load error in Enketo.
No validation errors, but will throw a form load error in Enketo:
${town}=town and contains(join(' ',instance('submissions')/root/item[street=${street}]/module),name)
Error message:
FormLogicError: Could not evaluate: /model/instance[@id="ref_list"]/root/item[ /model/instance[1]/data/grp_start/town =town and contains(join(' ',/model/instance[@id="submissions"]/root/item[street= /model/instance[1]/data/grp_start/street ]/module),name)], message: callNative() can't handle nodeset functions yet for townandcontains()
No validation errors, no form load error in Enketo, note the order of first filter is reversed.
town= ${town} and contains(join(' ',instance('submissions')/root/item[street=${street}]/module),name)