You are viewing limited content. For full access, please sign in.

Question

Question

Forms: Issue with regex on single line field

asked on August 24, 2022 Show version history

I am getting the issue [LFF2107-Submission Error] upon submitting a field.

This occurs due to using a regular expression on a Single Line field.

At first I tried "(\A|\a)\d{8}" then I tried "\A\d\d\d\d\d\d\d\d". Both cause the issue above.

After some browsing on Answers, i found this post from 2018. This workaround of disabling all validation "works" but since this a few years old, I was wondering if this validation bug has been fixed yet so that I can leave the user validation option enabled.

My Forms version is Professional Version 10.4.5.324 and will be upgrading to 11 eventually.

Edit: Forgot to mention that the test string that I am using is "A00000000"

0 0

Answer

SELECTED ANSWER
replied on August 25, 2022

I believe your Regex is incorrect.

To validate A00000000 or a00000000 (First character is a or A, followed by 8 digits) your regex should look like

[aA]\d{8}  or [aA]\d\d\d\d\d\d\d\d

1 0
replied on August 25, 2022

Thank you Steve your expressions fixed it.

I was using regextester.com to check if my test strings would match my expressions. They would show as matching but maybe the regex on that website works differently than how LF does it.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.