• Jeff_Brown
  • NEWBIE
  • 10 Points
  • Member since 2016
  • Mayo Hardware

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello,

Im trying to create a data validation rule for the phone number field to only accept the following formats +99 9 9999 9999 or +99 9 999 9999.
I found and modified the below online which works well for the number part, however I cant figure out how to add the + into this validation rule...

AND( 
IF(ISBLANK(Phone) , false , NOT( REGEX( Phone,"[0-9]{2}[\\s][0-9]{1}[\\s][0-9]{3}[\\s][0-9]{4}"))), 
IF(ISBLANK(Phone) , false , NOT( REGEX( Phone,"[0-9]{2}[\\s][0-9]{1}[\\s][0-9]{4}[\\s][0-9]{4}"))) 
)

I also found the below which works on its own, but I can figure out how to join these two into one validation rule...
LEFT(Phone, 1) <> "+" 

Please help.
Thanks Jeff
Hello,

Im trying to create a data validation rule for the phone number field to only accept the following formats +99 9 9999 9999 or +99 9 999 9999.
I found and modified the below online which works well for the number part, however I cant figure out how to add the + into this validation rule...

AND( 
IF(ISBLANK(Phone) , false , NOT( REGEX( Phone,"[0-9]{2}[\\s][0-9]{1}[\\s][0-9]{3}[\\s][0-9]{4}"))), 
IF(ISBLANK(Phone) , false , NOT( REGEX( Phone,"[0-9]{2}[\\s][0-9]{1}[\\s][0-9]{4}[\\s][0-9]{4}"))) 
)

I also found the below which works on its own, but I can figure out how to join these two into one validation rule...
LEFT(Phone, 1) <> "+" 

Please help.
Thanks Jeff