Robert Blank schrieb:
Hello,

I have a problem with the validation of an UploadWidget. I use a SelectionWidget with two entries: "a" and "b". If "a" is selected i do not validate the UploadWidget. If "b" is selected the UploadWidget have to be NOT null.
Here the script for that:

UploadWidget.setValidationError(null);
if (SelectionWidget.value == "b") {
  if (UploadWidget.value == null) {
UploadWidget.setValidationError(new ValidationError("Upload a file!", false));
  }
}

The problem is: If i select "b" and do not upload any file, i get the ValidationError as expected when i try to save the Form. After that I select "a" and want to save the Form, but the Form will not be saved. Only the ValidationError disappears. If I want to save again, it works.

I tried the same with a normal "StringWidget" and there it works.

Can anyone help me?


Robert

Any Ideas?!


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

Reply via email to