Skip to main content
Erik Laramee (ACA Global) 님이 #Data Management에 질문했습니다

Hey gang, I have combed these forums and worked the google machine without any success to find the syntax for a validation rule I need. We have a field that must be exactly six digits and numbers only, otherwise it breaks one of our integrations. No letters, commas, special characters allowed. As such, a simple number field won't work as that will default to using commas and in yet another SF headsmacking moment, apparently we are not allowed to customize the formatting of a number field.

It has been explained to me that ISNUMBER won't work as it will allow certain types of number formatting that we don't want. So, this is the relevant segment of the val rule that I have. It prevents me from entering characters but also fires if I enter a 6 digit number.

Can anyone help? Thanks in advance for your time.

NOT( REGEX( Custom_Field__c , '[^0123456789]' ) ),

 

LEN( Custom_Field__c ) <> 6 )

답변 3개
  1. 2020년 7월 21일 오후 7:14
    OK.. preliminary testing looks good! Thanks a ton. Can you explain how that works?
0/9000