Workflow validator - Regular expression check

Gaurav Gupta March 29, 2023

Hello community members,

For a use case, we need to apply the regular expression check validator in the workflow on a single select field. The field has 3 values:

  • Yes
  • No
  • Not needed

We need the validation to pass if the value is not 'NO'. We have tried the option as suggested in the documentation, [Yes, Not needed], but it does not work, and errors out.

Can someone please help us here?

 

3 answers

1 vote
Tina Xu July 3, 2023

Please try below solutions:

 

Not include string "No"

^((?!No).)*$

Not start with "No"

^(?!No).*$

0 votes
Christoph Päper February 21, 2024

The in-place documentation still suggests “Option [A, B]” to match either or both, “Option A” and “Option B”, whereas standard regular expressions would have “Option (A|B)” to match either – or in your case “(Yes|Not needed)”.

0 votes
miguel.yoshida May 22, 2023

Hi

try this format:

(Yes, Not needed)

i was also looking for that solution and then i began to search for regular expression examples and that worked for me.

cheers,

MY

Suggest an answer

Log in or Sign up to answer