How to Validate and Confirm Passwords in Dreamweaver
Dreamweaver CS6 tools for collecting and conforming passwords work like this: First you create a password field using a Spry Validation widget, and then you create a confirm field using a Spry Validation widget.
Of course, to create these, or any form fields, your insertion point must be inside a form. With that all in place, follow these steps to create a password/password-confirm form field set:
1Choose Insert→Form→Spry Validation Password.
The Input Tag Accessibility Attributes dialog box opens.
2Enter a form field name in the ID field.
For example, use password.
3Enter a descriptive label that tells people what to put in the Label field.
For example, Enter a six-digit or more password here.
4Click OK and define any necessary form field attributes in the Properties Inspector.
For example, you might define a width and/or a maximum number of characters a user can enter (in the Char Width or Max Chars boxes, respectively).
5Click the aqua label above the form field to define validation criteria.
For example, you might make this field required, and require a minimum of six characters.
6Create the confirmation field by choosing Insert→Form→Spry Validation Confirm.
You can use the same techniques you used to define the password field to define the confirm field. But because whatever is entered in the confirm form field has to match what was entered in the password field, the only really necessary parameters here are an ID (say, confirm) and label (Type your password again.).
Try breaking the rules you defined to test your validation scripts.
For example, you can try entering an e-mail address with only three characters. Or, an e-mail address without an @ symbol. Or, an e-mail address with no . (dot) in it. The validation script will reject all these entries.