Using a RegEx to validate a value in an iPaaS form

Is there a way to write a condition that will compare a value of an iPaaS text box element with a regular expression?  In my specific case, I have some validation sanity that wants to make sure a particular element contains exactly and only three capital letters.  I tried using a Text = Text comparison with @regex:^[A-Z]{3}$ as the comparison value but that is not working.

 

Thanks,
Jim

Asked by Jim Lucas on Fri 3/22/24 3:46 PM
Sign In to leave feedback or contribute an answer

Answers (2)

This answer has been marked as the accepted answer
David Tod Mon 3/25/24 3:14 PM

I may be under/overthinking this, but see image.

No feedback
David, that worked! I was doing things a little differently, and part of what I am trying to do is disable a Submit Action button unless all data is valid. I have three other hidden fields for validation and these all are checked in the Condition section of that button. Is there a way to incorporate this validation into that Condition?

Thanks,
Jim
- Jim Lucas Mon 3/25/24 3:22 PM
So I was working with my iPaaS integrator and we believe there is no expression that can evaluate RegEx in forms. I wound up creating a flow that was used to set the value of a hidden field which stores the validity of the other field I wanted to check against. I have several such fields for each section of the form. The action button only becomes enabled once all these hidden validity fields indicate validity for all entries in the form. Seems to work fine, but it would be nice to be able to evalutate RegEx in the form without having to use a flow. - Jim Lucas Tue 3/26/24 12:04 PM

David Tod Fri 3/22/24 4:05 PM

Use the "contains" function? i.e. form element value contains your regular expression.

No feedback
David, I just tried the Contains function without success. I tried both just the regex: ^[A-Z]{3}$ as well as @regex:^[A-Z]{3}$ - neither match.

Regards,
Jim
- Jim Lucas Mon 3/25/24 2:40 PM
I'm not sure. My testing is running into your initial issue. - David Tod Tue 3/26/24 8:29 AM