function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
(BillingCountry=="USA")&&NOT(REGEX(BillingPostalCode,"\\d{5}(-\\d{4})?"))
Hi khushbu,
find the below solution
NOT(ISNUMBER(BillingPostalCode))
if you find this helpful mark it as the best answer.
You can use below formula to validate postal code. This formula is using regex for validating the input to the postal code
NOT(
REGEX(Your postal code field api name, "((?i)[ABCEGHJKLMNPRSTVXY]\\d[A-Z]?\\s?\\d[A-Z]\\d)?")
)
Hope this will help you. :)
Please check the below links:
https://developer.salesforce.com/docs/atlas.en-us.usefulValidationRules.meta/usefulValidationRules/fields_useful_validation_formulas_contact.htm
http://www.salesforcetutorial.com/using-regex-function-validation-rule/
https://help.salesforce.com/HTViewHelpDoc?id=fields_useful_field_validation_formulas.htm
https://success.salesforce.com/answers?id=90630000000gkLXAAY
Hope this may help you!
Best Regards,
Deepthi
By using REGEX function we can build validation rule to enforces proper data format.
Example: Validates Account Billing Zip/Postal Code is in 5 digit format or 9 digit format if billing country is the USA.
Error condition formula for this example:
Please check the below link for more details
https://developer.salesforce.com/docs/atlas.en-us.usefulValidationRules.meta/usefulValidationRules/fields_useful_validation_formulas_contact.htm
Hope this helps you!
Best Regards,
Jyothsna
Validates that the account Billing Zip/Postal Code is in the correct format ifBilling Country is Canada.
AND(
OR(BillingCountry = "CAN", BillingCountry = "CA", BillingCountry = "Canada"),
NOT(REGEX(BillingPostalCode,
"((?i)[ABCEGHJKLMNPRSTVXY]\\d[A-Z]?\\s?\\d[A-Z]\\d)?"))
)
For more detail please review the following link
https://help.salesforce.com/HTViewHelpDoc?id=fields_useful_validation_formulas_account_address.htm&language=en_US
Hope this helps you!
Thanks
Hi khushbu,
find the below solution
NOT(ISNUMBER(BillingPostalCode))
if you find this helpful mark it as the best answer.