Hi,
I was wondering if there is a global setting somewhere that would allow orbeon forms to NOT consider blanks as valid input to "required" field. I would think this is extremely common and in most cases a series of blank does not consistute a valid input. This would avoid having to do do this: <xforms:bind nodeset="" required="true()" constraint="string-length(normalize-space(.))>0"/> Or am I may be missing something obvious or a better alternative? Thanks for any feedback. |
I have not seen any response to this. Does what I am asking NOT make sense? I would think that from a practical standpoint others would have encountered situations where one or more blank DOES not make up a valid field value and hence if the field is required, it should remain in error. That seems like a convenient global form setting. |
What you are asking makes a lot of sense. In fact, that's something we
think is broken in XForms! Basically, the required property does not make much sense as is in most cases. You can usually add e.g. constraint="normalize-space() != ''" and have the desired behavior. We have also thought about having an option to change the meaning of required to "non-blank" instead of the current "non-empty". -Erik On Thu, Jan 21, 2010 at 7:56 PM, npujol73 <[hidden email]> wrote: > > > I have not seen any response to this. Does what I am asking NOT make sense? > I would think that from a practical standpoint others would have encountered > situations where one or more blank DOES not make up a valid field value and > hence if the field is required, it should remain in error. That seems like a > convenient global form setting. > -- > View this message in context: http://n4.nabble.com/normalize-space-as-default-behavior-to-required-tp1011785p1088979.html > Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Yes an option would be great. I think making it a global setting would be too rigid, but making a model / instance attribute may be more appropriate. I would be happy to contribute a solution if you could point me in the right direction. Thx Nicolas On Jan 21, 2010, at 10:06 PM, "Erik Bruchez-3 [via Orbeon Forms (ops-users)]" <[hidden email]> wrote:
|
Administrator
|
Nicolas,
For reference, we have an RFE for this, which was added almost 2 years ago. I couldn't agree more with you, and can't even think of a case where the current behavior, which is mandated by the XForms spec, makes sense. Any taker to implement or sponsor this? ;) http://forge.ow2.org/tracker/?group_id=168&atid=350207&func=detail&aid=308804 Alex On Sun, Jan 24, 2010 at 9:28 AM, npujol73 <[hidden email]> wrote: > Yes an option would be great. I think making it a global setting would be > too rigid, but making a model / instance attribute may be more appropriate. > I would be happy to contribute a solution if you could point me in the right > direction. > Thx > Nicolas > On Jan 21, 2010, at 10:06 PM, "Erik Bruchez-3 [via Orbeon Forms > (ops-users)]" <[hidden email]> wrote: > > What you are asking makes a lot of sense. In fact, that's something we > think is broken in XForms! Basically, the required property does not > make much sense as is in most cases. > > You can usually add e.g. constraint="normalize-space() != ''" and have > the desired behavior. > > We have also thought about having an option to change the meaning of > required to "non-blank" instead of the current "non-empty". > > -Erik > > On Thu, Jan 21, 2010 at 7:56 PM, npujol73 <[hidden email]> wrote: >> >> >> I have not seen any response to this. Does what I am asking NOT make >> sense? >> I would think that from a practical standpoint others would have >> encountered >> situations where one or more blank DOES not make up a valid field value >> and >> hence if the field is required, it should remain in error. That seems like >> a >> convenient global form setting. >> -- >> View this message in context: >> http://n4.nabble.com/normalize-space-as-default-behavior-to-required-tp1011785p1088979.html >> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com. >> >> >> -- >> You receive this message as a subscriber of the [hidden email] mailing >> list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > ________________________________ > View this message in context: Re: normalize-space() as default behavior to > "required" > Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Orbeon Forms - Web forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |