W3C home > Mailing lists > Public > www-forms@w3.org > November 2008

Re: validating an xform

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Mon, 24 Nov 2008 23:48:10 -0800
Message-Id: <28947202-1DBA-4F17-967F-E10D1EC7DEFE@orbeon.com>
To: xforms <www-forms@w3.org>

> I'm new to the list. I'd like to ask your help to clarify some things
> because I don't know what is the best practice for my issues. The
> problem is the following: I have an xform where input widgets can have
> some constraints (e.g. a field can only accept integers from an
> interval, or some fields are required, etc.). How to check if the form
> satisfies these constraints?
> (1) Should it be done on the client side with JavaScript? or

In XForms, you often validate without JavaScript! See for example:

   <xforms:bind nodeset="age" constraint="number(.) > 10"  
required="true()" type="xs:integer"/>

In addition, for implementations that support it, you can also use XML  
Schema types, which are quite powerful.

All this is part of the beauty of XForms!

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/
Received on Tuesday, 25 November 2008 07:48:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:14 GMT