Custom web address field validation

URL fields are simply glorified text fields. Formatting is applied to these to generate the URL into a link format. Additionally, some minimal validation is applied, and the prefix "http://" is applied automatically if missing.

From a customization point of view, there isn't really that much that can be done with these fields, other than use them, as such.

In some circumstances we will want to make sure that the URL captured follows a specific set of business rules. As one example, we may expect to capture a link to a specific social network in which we can validate that input, and reject it if it does not conform.

Getting ready

Let's use for this example the same environment we created earlier. If you have jumped ...

Get Microsoft Dynamics CRM 2011 Scripting Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.