You need to sign in to do that
Don't have an account?
Larry Van Cantfort
Problem I have a regex question for validation rule I have
I am trying to check to see if a field has only numbers in it. It can also be left blank. The regex formula that I have written accepts both letters and numbers and I cannot figure out what I am doing wrong. I am new to regex so please be kind.
The validation rule is:
AND(
ISBLANK(Checking_Account_Number__c),
NOT (REGEX(Checking_Account_Number__c, "(//[0-9]+)"))
)
Thanks for any help.
The validation rule is:
AND(
ISBLANK(Checking_Account_Number__c),
NOT (REGEX(Checking_Account_Number__c, "(//[0-9]+)"))
)
Thanks for any help.
Use below validation instead.
NOT (REGEX(Checking_Account_Number__c, "^[0-9]*$"))
Mark this as an answer if this solves your problem.
NOT (REGEX(Checking_Account_Number__c, "^[0-9]*$"))
and not
AND( ISBLANK(Checking_Account_Number__c) , NOT (REGEX(Checking_Account_Number__c, "^[0-9]*$")))
Thanks for your help. I did have the ISBLANK in there. That fixed it.
Regex you wrote in your description seems correct except one thing i.e, '//'. So just remove it Thanks