summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples
diff options
context:
space:
mode:
authorxue <>2006-02-23 03:38:15 +0000
committerxue <>2006-02-23 03:38:15 +0000
commit8569373e8cb6163f182fe13ffbc44ea1b2c961cd (patch)
treeec3dabb93f753e23880e425c8cbdb9920e4b063f /demos/quickstart/protected/pages/Controls/Samples
parent697285390a0495dc839d43806bb5b3dddf2f3af7 (diff)
more clean up work about validators.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TCompareValidator/Home.page34
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataTypeValidator/Home.page57
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataTypeValidator/Home.php8
3 files changed, 98 insertions, 1 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TCompareValidator/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TCompareValidator/Home.page
index ab99436a..c5cec8af 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TCompareValidator/Home.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TCompareValidator/Home.page
@@ -1,7 +1,7 @@
<com:TContent ID="body">
<h1>TCompareValidator Samples</h1>
-<p><strong>Note:</strong>TCompareValidator will start
+<p><strong>Note:</strong> TCompareValidator will start
to validate only if both inputs are not empty.</p>
<table class="sampletable">
@@ -39,6 +39,38 @@ Compare validator with client-side validation disabled:
</td>
</tr>
+<tr>
+<td class="samplenote">
+Comparing with a constant value:
+</td>
+<td class="sampleaction">
+<com:TTextBox ID="TextBox3" Text="a" />
+<com:TCompareValidator
+ ValidationGroup="Group3"
+ ControlToValidate="TextBox3"
+ ValueToCompare="test"
+ Text="You must enter 'test'." />
+<com:TButton Text="Submit" ValidationGroup="Group3" />
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Comparing with an integer:
+</td>
+<td class="sampleaction">
+<com:TTextBox ID="TextBox4" Text="0" />
+<com:TCompareValidator
+ ValidationGroup="Group4"
+ ControlToValidate="TextBox4"
+ ValueToCompare="100"
+ DataType="Integer"
+ Operator="GreaterThan"
+ Text="You must enter an integer greater than 100." />
+<com:TButton Text="Submit" ValidationGroup="Group4" />
+</td>
+</tr>
+
</table>
</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataTypeValidator/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TDataTypeValidator/Home.page
new file mode 100644
index 00000000..783769ff
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataTypeValidator/Home.page
@@ -0,0 +1,57 @@
+<com:TContent ID="body">
+
+<h1>TDataTypeValidator Samples</h1>
+<p><strong>Note:</strong> TDataTypeValidator will start
+to validate only if both inputs are not empty.</p>
+
+<table class="sampletable">
+
+<tr>
+<td class="samplenote">
+Data type validator with default settings:
+</td>
+<td class="sampleaction">
+<com:TTextBox ID="TextBox1" Text="a" />
+<com:TDataTypeValidator
+ ValidationGroup="Group1"
+ ControlToValidate="TextBox1"
+ DataType="Float"
+ Text="You must enter a floating number." />
+<com:TButton Text="Submit" ValidationGroup="Group1" />
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Data type validator with client-side validation disabled:
+</td>
+<td class="sampleaction">
+<com:TTextBox ID="TextBox2" Text="a"/>
+<com:TDataTypeValidator
+ ValidationGroup="Group2"
+ EnableClientScript="false"
+ ControlToValidate="TextBox2"
+ DataType="Currency"
+ Text="You must enter a currency." />
+<com:TButton Text="Submit" ValidationGroup="Group2" />
+</td>
+</tr>
+
+<tr>
+<td class="samplenote">
+Validating a date input:
+</td>
+<td class="sampleaction">
+<com:TTextBox ID="TextBox3" Text="a" />
+<com:TDataTypeValidator
+ ValidationGroup="Group3"
+ ControlToValidate="TextBox3"
+ DataType="Date"
+ Text="You must enter a valid date." />
+<com:TButton Text="Submit" ValidationGroup="Group3" />
+</td>
+</tr>
+
+</table>
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataTypeValidator/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TDataTypeValidator/Home.php
new file mode 100644
index 00000000..88d2dbf2
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataTypeValidator/Home.php
@@ -0,0 +1,8 @@
+<?php
+
+class Home extends TPage
+{
+
+}
+
+?> \ No newline at end of file