Dan Munns Posted April 11, 2022 Posted April 11, 2022 Hi all, I have a field in an IC form that should limit the number of digits to 6 and return an error if anything else is entered: ^\d{6}$ However if the user adds a space to the end of the numbers then it is still allowed. I have tried this: ^[0-9]{6}$ which should be the same but explicitly stating the numbers 0-9 and still have the same issue. Both above regex expressions match correctly in other applications and on testing sites by disallowing the data if a space is added to the end of the numbers. Am I missing something here or is this a bug?
Victor Posted April 11, 2022 Posted April 11, 2022 @Dan Munns this is not an issue in IC (assuming this is an acronym for Intelligent Capture)... is only an issue in PC (previous engine) and in the form designer from what I can see... do you have PC2 enabled in your instance?
Dan Munns Posted April 11, 2022 Author Posted April 11, 2022 @Victor PC2 was turned off, but if I turn it on there is no difference. If I use the new or old admin UI then this is the result whilst editing the PC As you can see with many spaces it still passes the expression check. On the actual form on the portal it passes as well.
Victor Posted April 11, 2022 Posted April 11, 2022 @Dan Munns yeah, I know there is an issue when using the test in the designer ... but he validation works ok (it makes the value invalid if it has spaces) when running the progressive capture... the PC2 one that is...
Dan Munns Posted April 11, 2022 Author Posted April 11, 2022 @Victor ok so switching PC2 off and back on after I made the change made it work on the form on the portal. Thanks. 1
Dan Munns Posted April 12, 2022 Author Posted April 12, 2022 @Victor one issue I have now is with PC2 enabled one of my captures fails as below: Only happens when dynamic questions are added to the form though (though this question itself is dynamic). Even if I turn off the requirement to have the question answered it still fails in the same way. With PC2 off this question works fine but then the regex question on a different form doesn't work as expected.
Guest Ehsan Posted April 12, 2022 Posted April 12, 2022 @Dan Munns, EDIT: Sorry, this is with the Support team, I will wait for the result of the investigation.
Dan Munns Posted April 12, 2022 Author Posted April 12, 2022 @Ehsan so this question shows as not completed when it is completed when clicking 'Next' on the PC. This only happens when PC2 is enabled and when other dynamic questions are added to the form (seems to be these): These questions have 3 override flags set: Change Type in the CGL flag is a simple list with CGL appended to the change type in raw but not shown in display. If PC2 is disabled then this question works as expected but the regex for a different form fails to work correctly (as per my original post in this thread).
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now