Search code examples
sharepointsharepoint-2010

IP address field validation


I'm trying to validate an IP address column in SharePoint 2010 with the following formula. I get an error telling me there's a syntax error without anymore details. Knowing it works in Excel; any idea what's wrong with this formula?

=AND((LEN(Address)-LEN(SUBSTITUTE(Address;".";"")))=3;ISNUMBER(SUBSTITUTE(SUBSTITUTE(Address;":";"");".";"")+0))

Solution

  • The answer reside in the fact that there are multiple limitations to SharePoint field validation by formula. Although it uses the same syntax as Excel, its far from being as versatile as Excel is. Here's the well hidden reference that list available functions for field validation.

    The problem in the previous question is that SUBSTITUTE() and ISNUMBER() aren't available.

    A proper way to validate an IP address would be using a combination of FIND() and MID() instead.