Example: Use a constraint with a regular expression on a field to add "smart-code" validation
Employees can add telephone numbers to their employee profile. The Phone Number field is an alpha field with no edits against entered values. This means a user can enter the phone number in any number of formats and the application will store the value. For example, "(XXX)XXX-XXXX" or "XXX.XXX.XXXX" or "XXXXXXXXXX". Data in multiple formats could cause problems if you need to work with those numbers in the future, such as extract them from the database.
You can create a customization to add a validation to the field that ensures enter Phone Numbers using a standard format: XXX-XXX-XXXX.