beautypg.com

Specify when validation occurs, Specify a minimum and maximum number characters – Adobe Dreamweaver CS3 User Manual

Page 473

background image

DREAMWEAVER CS3

User Guide

466

Specify when validation occurs

You can set the point at which validation occurs—when the site visitor clicks outside the widget, as the visitor types,
or when the visitor tries to submit the form.

1

Select a Validation Text Field widget in the Document window.

2

In the Property inspector (Window > Properties) select the option that indicates when you want validation to

occur. You can select all of the options or none of them.

Blur

Validates whenever the user clicks outside the text field.

Change

Validates as the user changes text inside the text field.

Submit

Validates when the user tries to submit the form.

Specify a minimum and maximum number characters

This option is only available for None, Integer, E-mail Address, and URL validation types.

1

Select a Validation Text Field widget in the Document window.

2

In the Property inspector (Window > Properties), enter a number in the Min Chars or Max Chars box. For

example, if you enter 3 in the Min Chars box, the widget only validates if the user enters three or more characters.

Zip Code

Formats vary. Make your selection from the Format pop-
up menu of the Property inspector.

Phone Number

Text field accepts phone numbers formatted for U.S. and
Canada (000) 000-0000 or custom formats. If you select
custom format as an option, enter the format, for
example, 000.00(00), in the Pattern text box.

Social Security Number

Text field accepts social security numbers formatted as
000-00-0000. If you want to use a different format, select
Custom as your validation type and specify a pattern.
The pattern validation mechanism accepts only ASCII
characters.

Currency

Text field accepts currency formatted as 1,000,000.00 or
1.000.000,00.

Real Number/Scientific Notation

Validates various kinds of numbers: integers (for
example, 1); float values (for example, 12.123); and float
values in scientific notation (for example, 1.212e+12,
1.221e-12 where e is used as a power of 10).

IP Address

Formats vary. Make your selection from the Format pop-
up menu of the Property inspector.

URL

Text field accepts URLs formatted as http://xxx.xxx.xxx or
ftp://xxx.xxx.xxx.

Custom

Lets you specify a custom validation type and format.
Enter the format pattern (and hint if desired) in the Prop-
erty inspector. The pattern validation mechanism
accepts only ASCII characters.

Validation type

Format

September 4, 2007