xp-framework/xp-framework — pull request #198 by mrosoiu (2012-11-05 08:51:52+00:00)
Title: Ignore missing OCCURRENCE_OPTIONAL file upload input fileds

Hi,

Currently the OCCURRENCE_OPTIONAL flag is ignored for file upload input fields, so you can't have optional input fields in your forms. The formerror you get is 'nofile' triggered in `scriptlet.xml.workflow.checkers.FileUploadPrechecker`, although the prechecker must not be called for missing optional fields.

This patch introduces the following BC-break: for missing OCCURRENCE_UNDEFINED file upload input fields, the triggered formerror is now 'missing' instead of 'scriptlet.xml.workflow.checkers.FileUploadPrechecker::nofile'. IMO this is the correct behaviour.

Let me know what you guys think.

Cheers,
-- Marius