W3C home > Mailing lists > Public > www-forms@w3.org > May 2004

Applying multiple binds to an element...

From: Dan G. Switzer, II <dswitzer@pengoworks.com>
Date: Tue, 4 May 2004 20:12:24 -0400
Message-Id: <200405050012.i450CUOr005024@ms-smtp-04-eri0.ohiordc.rr.com>
To: <www-forms@w3.org>

What's the best way to output multiple validations to the same element using
bind statements? I have a case where a user might apply multiple validation
rules (like is it a phone number and does it match a pattern.) 

For example:
<xform:bind 
	ref="//xform:model/xf:instance/homePhone"
	required="true"
	type="valid:PHONE"
	/>
<xform:bind 
	ref="//xform:model/xf:instance/homePhone"
	required="true"
	type="valid:REGEX"
	/>

It doesn't seem right to have the required property on both. Is there a
better way to approach this--without combining my two validation procedures
into one?

Thanks,
Dan
Received on Tuesday, 4 May 2004 20:13:09 GMT

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