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