I am looking to put write a validation condition for one attribute in the registration page in a tracker: BI (identification card number). It should consist of 11 digits plus a letter (110300175184E), so I would like a regex expression to limit digits to 11 + letter. Otherwise, an error message must be shown to tell the user to write the BI correctly.
The example you mentioned above consists more than 11 digits but I hope this works if it does please mark the post as a solution
d2:hasValue(A{BI}) && d2:length(A{BI}) == 12 && d2:validatePattern( A{BI}, ‘\d{11}\w{1}’)
The program rule works as shown in demo below, but it does not stop me from proceeding if I click on save and continue and sometimes users may likely ignore the warning message, so the warning should be displayed and no data should be saved if there’s a response that violates the validation. Any more ideas?