• Morishka Willams
  • NEWBIE
  • 0 Points
  • Member since 2020

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

I am trying to write a validation rule on the standard Phone field which fulfils the following. The value should be accepted only if it starts with "001" otherwise a validation error should be thrown.
I have tried both the following and were successful in checking the prefix but failing in other cases.

1. 
LEFT(Phone, 3) <> "001"

2.
 AND(
NOT(ISBLANK(Phone)),
NOT(REGEX(Phone,"[001]{3}[1-9]{1}[0-9]{9}"))
)