• Thomas Panni 7
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

 

hi,

i have written validation rule for vat number format checking.it was checking for only one country.for rest of the countries it  havenot work.for example in that rule i have written for 3 countries..it is working fine for germany ,for  rest of the countries(finland,denmark) rule is not working.can u tell me where is the problem and what i have to do.

 

 

OR(OR(AND(AND(ISPICKVAL( Country__c ,'GERMANY') ,ISBLANK( VAT_No_c__c )),ISPICKVAL( Account_Type__c , 'Corporate')),NOT(REGEX( VAT_No_c__c ,"([A-Z]{2}\\d{9})?"))),
OR(AND(AND(ISPICKVAL( Country__c ,'FINLAND') ,ISBLANK( VAT_No_c__c)),ISPICKVAL(Account_Type__c ,'Corporate')), NOT(REGEX( VAT_No_c__c ,"([A-Z]{2}\\d{4})?")))
OR(AND(AND(ISPICKVAL( Country__c ,'DENMARK') ,ISBLANK( VAT_No_c__c)),ISPICKVAL(Account_Type__c ,'Corporate')),NOT(REGEX( VAT_No_c__c ,"([A-Z]{2}\\d{7})?"))))

 

Regards,

Praveen

  • September 10, 2012
  • Like
  • 0

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

  • September 07, 2012
  • Like
  • 0