W3C home > Mailing lists > Public > www-forms@w3.org > June 2007

Re: required attribute

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Mon, 04 Jun 2007 11:00:30 -0700
Message-ID: <4664533E.4090804@orbeon.com>
To: www-forms@w3.org


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:


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 


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
Received on Monday, 4 June 2007 18:00:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:20 UTC