cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Snowdon" <>
Subject Re: [CForm] javascript validation doesn't work?
Date Tue, 03 Aug 2004 21:29:07 GMT
Ok,  I found some references in the mailing list to this
functionality being removed at 2.1.5 in favour of widget

So how do they work?  Anyone have a sample peice of code?

>>> Phil Snowdon 4/08/2004 9:08:51 a.m. >>>
Take this snippet from the samples.  Supposedly if the price is
less than one, then it will show a validation error.  It

    <!-- This demonstrates form level validation -->
      var success = true;
      var price = widget.lookupWidget("dieselprice");
      if (price.value &lt; 1) {
can not be that low!", false));
          success = false;
      // Must return true/false
      return success;

even simpler

      return false;

Which should always generate a validation error doesn't seems to

Is this a known issue?  There's a comment in the Form.js code
    // FIXME: Remove check for removed syntax later.
    if (this.validator != undefined) {
        throw "Forms do not support custom javascript validators
anymore. Declare your validators in the form model file.";

Does this mean that we can't use javascript validadtors anymore.
 What does it mean by declaring your validators in the form model



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message