Regular expression validation rule is not working in Confiforms definition field

Henry Figueroa August 22, 2024

In a Confiforms definition field macro, I have defined a validation rule using a regular expression for a text area field to have the user enter multiple IP addresses. I tested the regular expression in regex101.com that works as expected, but not in the Confiforms validation rule. I am not sure if this is a bug or not in the application. I have the code written as:  

                  ([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})+

Please advise. Thank you.

Documentation reference

1 answer

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 22, 2024

Hi @Henry Figueroa 

As far as I understand this regexp validates one IP address

If you enter multiple in multiple rows - it will fail (as it is tested agains the whole contents/text in the textarea)

Alex

Henry Figueroa August 22, 2024

Hi @Alex Medved _ConfiForms_ . I am using a space between IP addresses, instead of newlines. I tried it with comma separated and semi-colons, but no luck. The "+" in the regular expression code allows for any single separations/delimiters. Thank you.

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 22, 2024

Yes, but ConfiForms does not split your values into groups and attempts to match regular expression against each group. It matches the whole contents against the given pattern

 

Henry Figueroa August 22, 2024

Thanks, Alex. This explains it why it did not work.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events