summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TRegularExpressionValidator
diff options
context:
space:
mode:
authorxue <>2006-02-22 02:46:25 +0000
committerxue <>2006-02-22 02:46:25 +0000
commitfceb3741d3b0c1e00e81a4a24caf7d49a86896b4 (patch)
treeb2d7f92eaacc92111701c493b91da9d882f580be /demos/quickstart/protected/pages/Controls/Samples/TRegularExpressionValidator
parent0922e304fb1d7fc2e486d7020e65e011b9f13e0d (diff)
Updated some validators and relevant demos.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples/TRegularExpressionValidator')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TRegularExpressionValidator/Home.page21
1 files changed, 12 insertions, 9 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TRegularExpressionValidator/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TRegularExpressionValidator/Home.page
index 5ce43fda..9c27057b 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TRegularExpressionValidator/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TRegularExpressionValidator/Home.page
@@ -1,8 +1,11 @@
<com:TContent ID="body">
<h1>TRegularExpressionValidator Samples</h1>
-<p><strong>Note:</strong>TRegularExpressionValidator will start
-to validate only if the input is not empty.</p>
+<p>
+<strong>Note:</strong> TRegularExpressionValidator will start
+to validate only if the input is not empty.
+</p>
+
<table class="sampletable">
<tr>
@@ -10,12 +13,12 @@ to validate only if the input is not empty.</p>
Regular expression validator with default settings:
</td>
<td class="sampleaction">
-<com:TTextBox ID="TextBox1" Text="a"/>
+<com:TTextBox ID="TextBox1" Text="xxx-xx-xxxx"/>
<com:TRegularExpressionValidator
ValidationGroup="Group1"
ControlToValidate="TextBox1"
- RegularExpression="\d+"
- Text="Only digits are allowed." />
+ RegularExpression="\d{3}-\d{2}-\d{4}"
+ Text="SSN must be in the format of xxx-xx-xxxx." />
<com:TButton Text="Submit" ValidationGroup="Group1" />
</td>
</tr>
@@ -30,8 +33,8 @@ Regular expression validator with client-side validation disabled:
ValidationGroup="Group2"
EnableClientScript="false"
ControlToValidate="TextBox2"
- RegularExpression="\d+"
- Text="Only digits are allowed." />
+ RegularExpression="[\w]{6,}"
+ Text="Input must consist of at least 6 characters." />
<com:TButton Text="Submit" ValidationGroup="Group2" />
</td>
</tr>
@@ -46,8 +49,8 @@ Regular expression validator with focus-on-error enabled and dynamic display:
ValidationGroup="Group3"
ControlToValidate="TextBox3"
Display="Dynamic"
- RegularExpression="\d+"
- Text="Only digits are allowed." />
+ RegularExpression="\d{5}(-\d{4})?"
+ Text="Invalid US ZIP code." />
<com:TButton Text="Submit" ValidationGroup="Group3" />
</td>
</tr>