To assign a data entry pattern to the E-mail Address text box
With the form still open, double-click the E-mail Address text box.
In the Text Box Properties dialog box, on the Data tab, click Data
Validation.
In the Data Validation dialog box, click Add.
Make sure that the first box under If this condition is true contains the
control's field ("email"), and then in the second box, click does not match
pattern.
In the third box, click Select a pattern.
In the Data Entry Pattern dialog box, in the Standard patterns list, select
Custom pattern to clear the existing text in the Custom pattern box. Patterns
use the syntax defined by the W3C XML Schema pattern restrictions.
In the Insert special character list, select Any Letter.
In the Insert special character list, select One or more.
In the Custom pattern box, type @contoso after the existing characters.
In the Insert special character list, select Period.
In the Custom pattern box, type com after the existing characters. The
custom data entry pattern should look like this: .+@contoso\.com
Click OK to exit the Data Entry Pattern dialog box.
In the ScreenTip box in the Data Validation dialog box, type Please use your
Contoso e-mail address. This text appears when a user points to or
right-clicks the control.
Close all open dialog boxes.
To test your changes, click Preview Form on the Standard toolbar. Type
(e-mail address removed) in the E-mail Address text box. A dashed red line appears
around the text box, which indicates that there's a problem with the data you
entered. When you move your mouse pointer over the text box, the ScreenTip
that you specified in step 13 appears.