summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Validation.page
diff options
context:
space:
mode:
authorwei <>2006-08-05 03:42:04 +0000
committerwei <>2006-08-05 03:42:04 +0000
commitc927f9343001b456c1fa25dc541c3f1b005510f8 (patch)
tree77471b0dbb0327e1c601ec4ffaeb02d9222dc4bd /demos/quickstart/protected/pages/Controls/Validation.page
parent58f7aa0ebe9920d33a22b95c3f73fc4b70a75426 (diff)
Fixed #278
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Validation.page')
-rw-r--r--demos/quickstart/protected/pages/Controls/Validation.page35
1 files changed, 35 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Validation.page b/demos/quickstart/protected/pages/Controls/Validation.page
index 12836b8c..2241f346 100644
--- a/demos/quickstart/protected/pages/Controls/Validation.page
+++ b/demos/quickstart/protected/pages/Controls/Validation.page
@@ -151,4 +151,39 @@ The summary can be displayed as a list, a bulleted list, or a single paragraph b
</p>
<com:RunBar PagePath="Controls.Samples.TValidationSummary.Home" />
+<h2>Client and Server Side Conditional Validation</h2>
+<p>
+ All validators contains the following events.
+ <ul>
+ <li>The <tt>OnValidate</tt> event is raise before the validator validation functions are called.</li>
+ <li>The <tt>OnSuccess</tt> event is raised after the validator has successfully validate the control.</li>
+ <li>The <tt>OnError</tt> event is raised after the validator fails validation.</li>
+ </ul>
+ The corresponding events for the client side is available as sub-properties
+ of the <tt>ClientSide</tt> property of the validator.
+</p>
+<p>The following example pop-up a message saying "hello" when the validator fails on the client-side.
+<com:TTextHighlighter Language="prado" CssClass="source">
+&lt;com:TRequiredFieldValidator ... &gt;
+ &lt;prop:ClientSide.OnError&gt;
+ alert("hello");
+ &lt;/prop:ClientSide.OnError&gt;
+&lt;/com:TRequiredFieldValidator&gt;
+</com:TTextHighlighter>
+The resulting client-side event callback function is of the following form.
+<com:TTextHighlighter Language="javascript" CssClass="source">
+function onErrorHandler(validator, sender)
+{
+ alert("hello");
+}
+</com:TTextHighlighter>
+Where <tt>validator</tt> is the current client-side validator and <tt>sender</tt>
+is the control that invoked the validator.
+</p>
+<h3>Conditional Validation Example</h3>
+<p>
+The following example show the use of client-side and server side validator events. The example
+demonstrates conditional validation.
+<com:RunBar PagePath="Controls.Samples.TClientSideValidator.Home" />
+</p>
</com:TContent> \ No newline at end of file