function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Narasimha LakshmiNarasimha Lakshmi 

Regex validation error

I have a validation rule:  AND( 
OR(BillingCountry = "US", BillingCountry = "USA", 
BillingCountry = "Hindustan"), 
NOT(REGEX(BillingPostalCode, 
"\\d{5}(-\\d{4})?")) )

I am not able to save  record after gave valid postal code.
Ex format:99999 or 99999-9999

Please let me know where i have done mistake
 
Best Answer chosen by Narasimha Lakshmi
Arpit Jain7Arpit Jain7
Hello Narasimha,

I tried and validation rule seems to be working. Once check that on record you are selecting correct country.

Thanks
Arpit

All Answers

Arpit Jain7Arpit Jain7
Hello Narasimha,

I tried and validation rule seems to be working. Once check that on record you are selecting correct country.

Thanks
Arpit
This was selected as the best answer
Narasimha LakshmiNarasimha Lakshmi
Thanks For quick response..
I have selected valid country but stil i am facing same error

 
Arpit Jain7Arpit Jain7
Can you please share your screen shot as the same validation rule works for me...
Narasimha LakshmiNarasimha Lakshmi
Thanks Arpit ,

Its working fine now


 
Arpit Jain7Arpit Jain7
Good to hear this !! Please mark this answer as SOLVED and BEST ANSWER to close the thread...

Thanks
Arpit