Skip to main content

Is there a way within in AttributeValidator Parameters -> Validation Rule -> Rule Configuration -> NOT EQUAL a value?

 

AttributeValidator

Could you use a 0 width negative lookahead in the regex?

Something like PROJECT_ID Contains Regex ^(?!@Value(_projectid))

 

It won't work if _projectid is found entirely within PROJECT_ID.

ex. projectid = 123 and PROJECT_ID= 1234

 


I think this will work if you want to fail only exact matches, not contains as well

^(@Value(_projectid).+|(?!@Value(_projectid)).*)$

 


Alternatively, could you replicate the logic in a tester?


Reply