Re: validating an xform

> 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 UTC