SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 1095 | Next

Joseph W. Lowery

"Dreamweaver CS3 Bible"


10. If you??™d like the user to only be able to enter the desired characters, select the Enforce Pattern
option. When the Enforce Pattern option is enabled, the user cannot enter invalid characters; the
characters in the form field briefly flash red and the invalid character is discarded.
615
Powering Ajax Pages with Spry 18
Creating Custom Validation Patterns
Anumber of the validation types or formats allow you to specify your own validation pattern. The Spry
framework provides a range of special characters to establish a custom pattern, as detailed in the following
table.
Character Represents
0 Digits between 0 and 9
A or a Case-sensitive alphabetic characters
B or b Case-insensitive alphabetic characters
X or x Case-sensitive alphanumeric characters
Y or y Case-insensitive alphanumeric characters
? Any character
For example, if you wanted to specify a telephone number with a format like (212) 555-1212, you would
enter (000) 000-0000 in the Pattern field of the Property inspector with the Format set to Custom Pattern. If the
Enforce Pattern option is selected, the open parenthesis appears after the first number is entered and the other
non-numeric characters appear as the user enters the numbers; non-numbers are not accepted.
When a Spry Validation Text Field is on the page, when the user saves the file, a notice
appears regarding the supporting files as with the Spry data objects.


Pages:
1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107