Prevent Special Characters in Single line text field

One of the data validation challenges is prevent the users from entering special characters in text field (Single line of text) . In this validation formula, nested if & isError will be used as in the following formula

=AND(IF(ISERROR(FIND(“,”,[ColumnName])),TRUE), IF(ISERROR(FIND(“&”,[ColumnName])),TRUE), IF(ISERROR(FIND(“;”,[ColumnName])),TRUE), IF(ISERROR(FIND(“[“,[ColumnName])),TRUE), IF(ISERROR(FIND(“+”,[ColumnName])),TRUE), IF(ISERROR(FIND(“:”,[ColumnName])),TRUE), IF(ISERROR(FIND(“)”,[ColumnName])),TRUE), IF(ISERROR(FIND(“-“,[ColumnName])),TRUE), IF(ISERROR(FIND(“*”,[ColumnName])),TRUE), IF(ISERROR(FIND(“(“,[ColumnName])),TRUE), IF(ISERROR(FIND(“$”,[ColumnName])),TRUE), IF(ISERROR(FIND(“%”,[ColumnName])),TRUE), IF(ISERROR(FIND(“~”,[ColumnName])),TRUE), IF(ISERROR(FIND(“#”,[ColumnName])),TRUE), IF(ISERROR(FIND(“]”,[ColumnName])),TRUE), IF(ISERROR(FIND(“.”,[ColumnName])),TRUE), IF(ISERROR(FIND(“!”,[ColumnName])),TRUE), IF(ISERROR(FIND(“@”,[ColumnName])),TRUE), IF(ISERROR(FIND(“/”,[ColumnName])),TRUE), IF(ISERROR(FIND(“\”,[ColumnName])),TRUE))

Also, the same formula can be used to prevent numeric values to be entered in the text field and replacing the characters with the numbers.

I hope this will be helpful for the SharePoint developers.

Enjoy single line of text without special characters

18 Replies to “Prevent Special Characters in Single line text field”

  1. I appreciate, cause I found exactly what I was looking for. You’ve ended my 4 day long hunt! God Bless you man. Have a nice day. Bye

  2. Fantastic web site. Lots of helpful information here. I am sending it to a few friends ans also sharing in delicious. And certainly, thanks in your effort! Andromache Vinnie Alick

  3. Awesome read. I just passed this onto a buddy who was doing some research on that. He actually bought me lunch because I found it for him! Thus let me rephrase: Thank you for lunch! Fredra Bennie Lari

  4. Hi there. I found your website via Google even as searching for a comparable topic, your web site came up. It appears good. I have bookmarked it in my google bookmarks to visit then. Henrie Alaric Zipnick

Comments are closed.