6

I am looking for an out-of-the-box solution (no code due to the lack of tools) for preventing the users from inputing list items with special characters. It would also be great if I could disallow names over a certain character length. Can somebody think of an easy solution to this problem?

  • Can you use InfoPath? You can use regular expressions with InfoPath. This link may help you. – newbie Jul 4 '17 at 6:11
10

Try this simple method using column validation.

On List Settings > Column > Column Validation, add this:

=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))

Source: How to validate the special character on SharePoint List Column

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.