:23 AM
To: users@cocoon.apache.org
Subject: Re: CForms 2.1 javascript validation not working
Hello
I use cocoon-2.2.0 and do my validation like this:
var success=true;
if (some-test) {widget.setValidationError(new
and in my flow I have:
form.load(my-data);
form.showForm("my-form");
if (form.isValid) {
form.save(my-data);
...
}
Barbara
On 11 Jul, 2009, at 2:42 pm, Gary Larsen wrote:
Hi,
For some reason javascript validation stopped working o
Hi,
For some reason javascript validation stopped working on all forms (2.1.9):
cocoon.log.error("test validation: return false");
return false;
The validation is fired on a submit widget yet t
Gary,if(!/^[0-9]{16}$/.test(account_no.value)) { //This is invalid }
will match an account number with no spaces.many thanks for that heads up. All is working a treat now.regardsAndrew
-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: 05 July 2006 13:13
To: users@cocoon.apache.org
Subject: Re: Widget javascript validation problem
> The other problem I am having is with the widget datatype definition for
> account_no:
>
> fd:datatype b
Gary,At a glance it looks like *account_no.setValidationError* is wrong as you declared the variable as *accountNumberLength*. This is why I like strict type checking.
that now works fine now. I remember having done the same mistake a while ago, and was trying to chek against the actual widget id I
-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: 05 July 2006 12:31
To: users@cocoon.apache.org
Subject: Widget javascript validation problem
>
>
>var success = true;
>var creditCardType = widget.lookupWidget("credi
Hi,I am having an issue with a widget form validation under cocoon 2.1.8. Basically what I have is a selection box with various credit card types, (visa, matercard...) etc, and based on the card selected a check is done on the credit card number field to make sure that the number of digits entered
be working. I looked at the sample files
> and could only find Javascript validation for the whole form. Is it possible
> to do something like:
>
>
> Foo:
>
>
>
>return false;
>
eem to be working. I
looked at the sample files and could only find Javascript
validation for the whole form. Is it possible to do something like:
Foo:
return false;
Hello,
I'm using Cocoon 2.1.8 and attempting to develop a few CForms. I've been
working on validating the forms and for some widgets I'm attempting to use
Javascript but it doesn't seem to be working. I looked at the sample files and
could only find Javascript validation fo
:56:54 +0100, oceatoon <[EMAIL PROTECTED]> wrote:
> > Ben Anderson wrote:
> >
> > > Does cocoon have the ability to generate javascript validation for me?
> > > I thought it did, but I can't the documentation anywhere and don't
> > > see anyt
es to validate that it is a number):
Your age:
-Ben
On Sat, 18 Dec 2004 12:56:54 +0100, oceatoon <[EMAIL PROTECTED]> wrote:
> Ben Anderson wrote:
>
> > Does cocoon have the ability to generate javascript validation for me?
>
Ben Anderson wrote:
> Does cocoon have the ability to generate javascript validation for me?
> I thought it did, but I can't the documentation anywhere and don't
> see anything in the samples.
> Thanks,
> Ben
If you mean client side validation,
check t
Does cocoon have the ability to generate javascript validation for me?
I thought it did, but I can't the documentation anywhere and don't
see anything in the samples.
Thanks,
Ben
-
To unsubscribe, e-mail: [EMAIL PROT
Hello,
when form is loaded and data inputted in valid way -> OK
when form is loaded and phone or email field is left missing -> comes a
failure page OK
when only phone is entered -> comes a failure page ERROR
when only email is enetered -> validates OK
when both are defined -> validates OK
so why
Don't need any modification to source. You can use:
ValidationError err = new ValidationError(new
I18nMessage("msg.key", "catalogue"));
this uses the ValidationError(XMLizable) constructor in the
class you mention.
>>> [EMAIL PROTECTED] 12/08/2004 1:47:06 a.m. >>>
Seems like
src\blocks\forms
Seems like
src\blocks\forms\java\org\apache\cocoon\forms\validation\ValidationError
.java
has to be changed to accept catalogue with it, so it can work.
public ValidationError(String errorMessageKey, String catalogue) {
this.saxFragment = new I18nMessage(errorMessageKey, catalogue);
Additional information:
if false -> true, it does i18n -message..
but how do I define catalogue which it uses? I would like to leave
default forms message in one place and custom stuff in another..
- Joose
11.8.2004 kello 15:50, Joose Vettenranta kirjoitti:
Hi,
I have like
if (ema
Hi,
I have like
if (email.value == null && phone.value == null) {
email.setValidationError(new
Packages.org.apache.cocoon.forms.validation.ValidationError("Atleast
another one", false));
and it works..
But how can I make that i18n-capable? so it will be translated
On Aug 4, 2004, at 3:40 PM, Phil Snowdon wrote:
I've got the validation working now. Thought I'd share the
results and ask a question on style. Both examples work, but as
a matter of best practice, which would be preferred? Also which
would be more likely to remain in future cocoon releases?
I'm
I've got the validation working now. Thought I'd share the
results and ask a question on style. Both examples work, but as
a matter of best practice, which would be preferred? Also which
would be more likely to remain in future cocoon releases?
The validation code has to call existing Java code
On Tue, 2004-08-03 at 23:08, Phil Snowdon wrote:
> Take this snippet from the samples. Supposedly if the price is
> less than one, then it will show a validation error. It
> doesn't.
>
>
>
>
> var success = true;
> var price = widget.lookupWidget("dieselprice");
> i
Ok, I found some references in the mailing list to this
functionality being removed at 2.1.5 in favour of widget
validators.
(http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=108639582110249&w=2)
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
doesn't.
var success = true;
var price = widget.lookupWidget("dieselprice");
if (price.value < 1) {
price.setValidationError(new
Packages
Ah, that makes sense :)
Thanks Joerg, that was exactly what I needed.
Adam
Joerg Heinicke wrote:
On 15.07.2004 05:30, Adam Walsh wrote:
Hi,
I have a form with two fields in it, where at least one of the fields
must be filled in, and I've put a bit of javascript to check it in
the form definition:
On 15.07.2004 05:30, Adam Walsh wrote:
Hi,
I have a form with two fields in it, where at least one of the fields
must be filled in, and I've put a bit of javascript to check it in the
form definition:
field 1
if (widget.getValue() == null &&
Hi,
I have a form with two fields in it, where at least one of the fields
must be filled in, and I've put a bit of javascript to check it in the
form definition:
field 1
if (widget.getValue() == null &&
widget.getParent().lookupWidget("fiel
On 08.06.2004 23:20, Yatin Shah wrote:
My requirement:
Perform business level validation to ensure the entered data are valid
before notifying the user that
their form request is accepted and refreshing the web page with
acceptance message.
[business level: requires access to external database fo
I also have a similar problem.
I upgraded to 2.1.5, and now my javascript(flow) based forms(Cocoon
Forms - woody) validation is no longer supported.
I searched the mail list but could not really find a suitable solution.
My requirement:
Perform business level validation to ensure the entered data
also means that the
http://localhost:/samples/blocks/forms/form1.flow sample no longer
works as it should - the javascript validation rule for price per liter of
diesel is not enforced).
Please can someone help out with this?
The flow level validation hack was replaced in favor of widget
valid
Hi,
I have a form that uses _javascript_ to
perform validation. I've implemented the validator using
in the form definition. Unfortunately, when I enable flow debug I
get a NullPointerException on loading the form definition:
Form (resource://org/apache/cocoon/forms/flow/_javascript_/v3/Form.
32 matches
Mail list logo