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
RPReddyRPReddy 

Need help to validate vat number format

hi,

i need to validate vat number like this format    "IE9X99999X".

here IE is the country prefix.

i have written validation rule  NOT(REGEX( VAT_No__c , "(^(IE)\\[0-9]{1}\\[A-Z]{1}\\d{5}\\[A-Z]{1})?"))).

but it was not taking the input like that format.

any one can u help me.please.

 

 

 

Thanks&Regards,

Praveen

CheyneCheyne

Try NOT(REGEX( Vat_No__c, "^IE[0-9]{1}[A-Z]{1}[0-9]{5}[A-Z]{1}$"))

Thomas Panni 7Thomas Panni 7
How can I create a formula to cover all 27 EU countries? Using the BillingCountryCode field to identify the country from Account address would be an idea, but the formula would exceed the size limit of salesforce formulas. Any ideas?