diff options
author | xue <> | 2006-08-05 21:34:30 +0000 |
---|---|---|
committer | xue <> | 2006-08-05 21:34:30 +0000 |
commit | b7f95ce37ae577e95a81e64aa2aaf3e2e698109d (patch) | |
tree | 85c6b9961ebbd4c9283fbd9b841703f9e4c47307 /demos/quickstart/protected/pages/Controls/Validation.page | |
parent | 550ba06593b467b643862d41a00ca2dd12ee704b (diff) |
merge from 3.0 branch till 1329.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Validation.page')
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Validation.page | 35 |
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">
+<com:TRequiredFieldValidator ... >
+ <prop:ClientSide.OnError>
+ alert("hello");
+ </prop:ClientSide.OnError>
+</com:TRequiredFieldValidator>
+</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 |