Re: required attribute

Daniel,

The default for the required property is already false(), so you don't 
need to set it explicitly to false(). This means that by default all 
values are optional.

But there is a caveat: the empty string is not a valid xs:integer, so if 
your value is blank it will fail validation even if it is not required.

To solve this problem, XForms 1.1 introduces new types which include the 
blank space, so you can use xforms:integer instead of xs:integer:

   http://www.w3.org/TR/xforms11/#empty-content-types

But these may not be supported in your implementation yet (we have yet 
to implement them in Orbeon Forms for example, but we hope to do so real 
soon).

-Erik

Daniel Maier wrote:
> 
> Hi all,
> 
> I'm not sure what I'm doing wrong. I have some bindings which are 
> required=false()
> For strings it works, but if I use any other datatype I can't get it 
> optional.
> Isn't it possible to have e.g. an integer  optional?
> 
> Thanks
> Daniel

-- 
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/

Received on Monday, 4 June 2007 18:00:39 UTC