SPElements Logo

Archive for September, 2009

SharePoint field format validation (regular expression)

Sunday, September 13th, 2009

If you want to use regular expression to validate SharePoint field format, there are few solutions you can choose from (such as:  Regular Expression Validator, Regular Expression Validator Field and few commercial solutions). The existing solutions are based on custom field type, which works very good as long as you don’t use Office application to update metadata and don’t need to integrate any 3rd party tool with the list (or write your own). If you want to use any 3rd party tools you might be in trouble since the they might not work with the custom field type.

Another approach is to use a constraint on an existing field (a new feature in SPListConstraints): regular expression validation. When loading a new item, or changing item metadata, the metadata is validated with the regular expression the user (administrator) selected.

Here’s how the setting of the field format validation looks like in the SPListConstraints (version 1.0b1 and above):

Field format validation


SP Elements Blog is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

2010 SPElements