I have a column in a SharePoint list called Personal Phone Number that I would like to add data validation to. I would like to validate 10 numbers and two hyphens. In the list settings this column appears as Field = PersonalPhoneNumber. The column is setup as a single line of text.
I cannot get any data validation to work, even basic stuff like equals x or len = 7. I'm new to Sharepoint, and my understanding is that when you have column names with spaces, you need to put the column name in quotes.
These are the expressions I have tried to just see some type of validation (not even working towards my real use case).
="PersonalPhoneNumber"="abc"
=PersonalPhoneNumber = "abc"
=LEN(PersonalPhoneNumber)=7
=LEN("PersonalPhoneNumber")=7
=IF(LEN(PersonalPhoneNumber)=7,TRUE,FALSE)
=IF(LEN("PersonalPhoneNumber")=7,TRUE,FALSE)
My process is as follows...
- Add in validation.
- Save validation
- Go back to the column settings to make sure the validation stayed in there and that I didn't make a small mistake like forgetting the first equals (if you do that SP strips out the whole expression)
- Refresh the page
- Go to my form and enter a value
- Hit save to trigger validation
Thanks in advance