From d5950ec0b553d46c4800adc0532d4464a4eb1883 Mon Sep 17 00:00:00 2001 From: wei <> Date: Tue, 27 Mar 2007 08:34:28 +0000 Subject: Fixed #278, conditional validation. --- .../protected/pages/Controls/Validation.page | 31 +++++++++++++++------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'demos/quickstart/protected/pages/Controls/Validation.page') diff --git a/demos/quickstart/protected/pages/Controls/Validation.page b/demos/quickstart/protected/pages/Controls/Validation.page index 38699550..b93f6d49 100644 --- a/demos/quickstart/protected/pages/Controls/Validation.page +++ b/demos/quickstart/protected/pages/Controls/Validation.page @@ -31,14 +31,7 @@ Validators share a common set of properties, which are defined in the base class
  • FocusElementID - the ID of the HTML element that will receive focus if validation fails and FocusOnError is true.
  • -

    Interacting the Validators with Javascript

    -

    Resetting or Clearing of Validators

    -

    -Validators can be reset on the client-side using javascript by calling the -Prado.Validation.reset(groupID) where groupID is the validator -grouping name. If groupID is null, then validators without grouping are used. -

    - +

    Prado Validation Controls

    TRequiredFieldValidator

    @@ -159,6 +152,24 @@ The summary can be displayed as a list, a bulleted list, or a single paragraph b

    +

    Interacting the Validators

    +

    Resetting or Clearing of Validators

    +

    +Validators can be reset on the client-side using javascript by calling the +Prado.Validation.reset(groupID) where groupID is the validator +grouping name. If groupID is null, then validators without grouping are used. +

    + + + + + +

    Client and Server Side Conditional Validation

    All validators contains the following events. @@ -191,7 +202,9 @@ is the control that invoked the validator.

    Conditional Validation Example

    The following example show the use of client-side and server side validator events. The example -demonstrates conditional validation. +demonstrates conditional validation. Notice that, we need to write code for both the +server side and client-side. Moreover, on the server side, we need to re-enable the conditional +validator so that its javascript code are produced no matter what (otherwise, the client-side validator is not available).

    -- cgit v1.2.3