Column Validation for Phone Number Code?

Iron Contributor
Dear SP Gurus,
Does anybody know the rule I need to place in the phone number column settings so I can valadate a user's entry of a phone number?
I would like it to be in the following format.
555-555-5555

Thanks for your help
2 Replies

Hi,

You can achieve this by using calculated column.

 

create 2 columns 

1.ContactNumber -Single line of text(for example).

2.Phone Number -Calculated Column(to show actual Phone Number).

Insert following formula in Phone Number formula field

 

 =TEXT(ContactNumber,"000-000-0000")

 

 

Now on default view, you can hide Contact Number Column.

Create a new Item and you done.

Insert dataInsert data

 

 

Your Final ViewYour Final View

 

 

Cheers !

 

Thanks Vipin, 

Isn't there a way that the field makes sure that the user types it in the right format the first time?

I thought that is what validation does?

What I am trying to avoid is users forgetting to type in the are codes, my staff have been forgetting the dashes too!

I am getting a lot of different variations of phone numbers.