Hi,
Can anybody help me out in this
As i have an input field it should accept only
numbers and decimals i got this by using xs:decimal but the thing is after
.(dot) it should accept only two decimals how can i do
this
Eg:123.22
Thanks and Regards,
K Gopikrishna Reddy
This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person. |
Administrator
|
On Tue, Apr 29, 2008 at 11:56 PM, Reddy, Gopikrishna
<[hidden email]> wrote: > As i have an input field it should accept only numbers and decimals i got > this by using xs:decimal but the thing is after .(dot) it should accept > only two decimals how can i do this > > Eg:123.22 You can do this with regular expressions. If you have a bind, that would translate into: <xforms:bind nodeset="point to your node" constraint="matches(., 'your regexp')"/> More on: http://www.w3.org/TR/xquery-operators/#func-matches Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ 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 |
In reply to this post by Reddy, Gopikrishna
Gopi
Try this: Try this..for your regular expression ^\d{1,3}($|\.\d{1,2}$) 1,2 or 3 digits followed by end OR decimal point and 1 or 2 digits and end of line. On Wed, Apr 30, 2008 at 2:56 AM, Reddy, Gopikrishna <[hidden email]> wrote:
-- 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 |
Free forum by Nabble | Edit this page |