You need to sign in to do that
Don't have an account?
Phuc Nguyen 18
Validation rule for text
Hello,
I could use some help on how to create a validation rule that forces users to fomat their text input
For example. I need the user input to be like
A.123456.D.54 OR A.789456.E.89
First letter needs to be an A followed by a . followed by 6 digits(numbers only) followed by a . followed by a D or E then followed by a . and then followed by 2 digits(numbers only)
Can I do this in a validation rule?
Thank you,
P
I could use some help on how to create a validation rule that forces users to fomat their text input
For example. I need the user input to be like
A.123456.D.54 OR A.789456.E.89
First letter needs to be an A followed by a . followed by 6 digits(numbers only) followed by a . followed by a D or E then followed by a . and then followed by 2 digits(numbers only)
Can I do this in a validation rule?
Thank you,
P
I've made some changes in the validation rule try now Please Mark It As Best Answer If It Helps
Thank You!
All Answers
Try Below Validation Rule Please Mark It As Best Answer If It Helps
Thank You!
I've made some changes in the validation rule try now Please Mark It As Best Answer If It Helps
Thank You!
Thank you for the reply. Does your example work in your test org? So no the user has to have a value in the field. Which is not the case. And it appears that the validation is not triggering correctly even when there is a value in the field. Not sure why. I think the formula looks correct.
AND(
NOT(ISBLANK( Application_Source__c )),
NOT(REGEX( Application_Source__c ,"[A{1}.[0-9]{6}.[D]{1}.[0-9]{2}")),
NOT(REGEX( Application_Source__c ,"[A]{1}.[0-9]{6}.[E]{1}.[0-9]{2}"))
)