Take this snippet from the samples.  Supposedly if the price is
less than one, then it will show a validation error.  It
doesn't.

 <fd:validation>
    <!-- This demonstrates form level validation -->
    <fd:javascript>
      var success = true;
      var price = widget.lookupWidget("dieselprice");
      if (price.value &lt; 1) {
          price.setValidationError(new
Packages.org.apache.cocoon.forms.validation.ValidationError("It
can not be that low!", false));
          success = false;
      }
      
      // Must return true/false
      return success;
    </fd:javascript>
  </fd:validation>

even simpler

  <fd:validation>
    <fd:javascript>
      return false;
    </fd:javascript>
  </fd:validation>

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

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
file?

Cheers

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to