1

I have a flow field (phone_private) and I want to validate if this field only contain numbers. I tried REGEX({!phone_private}, "[0-9 ]+") but the rule fires also if the field contain numbers. If I changed the rule to NOT(REGEX({!phone_private}, "[0-9 ]+")) the rule doesn't fire. What is wrong with the rule?

3

You want to check if it contains non-numbers, so that's what you need to do. The rule should look like:

REGEX({!phone_private}, "[^0-9 ]+")

The ^ operator at the beginning of a character class inverts the character matching, so only 0 through 9, and space, would be allowed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.