Hi everyone,
I’m encountering an issue with program rule validation in DHIS2 Android v2.9.1. I’m trying to validate a field ‘Sup - code superviseur’ to ensure it contains exactly two digits. The following rule works correctly on the web version:
!d2:validatePattern(#{Sup - code superviseur}, '^[0-9]{2}$')
However, it does not work on the Android version. I’ve tried other approaches using d2:length
and d2:substring
, but I haven’t been able to get it working on Android.
Has anyone experienced a similar issue, or does anyone have suggestions on how to implement this validation for the Android app?
Thank you for your help!