RE:INPUT FIELD ACCEPT ONLY TWO SPECIAL CHARACTERS / AND - AND NUMBERS 0-9 AND ALPHABETS A-Z AND a-z

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

RE:INPUT FIELD ACCEPT ONLY TWO SPECIAL CHARACTERS / AND - AND NUMBERS 0-9 AND ALPHABETS A-Z AND a-z

Reddy, Gopikrishna
Hi Can anybody please help me in this,
 
I Have an input field i need to restrict in the way it should accept only following things
only 2 special characters / and -
numbers 0-9
alphabets A-Z and a-z
 
 
 
 
Thanks in advance,
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.



--
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
Reply | Threaded
Open this post in threaded view
|

Re: RE:INPUT FIELD ACCEPT ONLY TWO SPECIAL CHARACTERS / AND - AND NUMBERS 0-9 AND ALPHABETS A-Z AND a-z

Hank Ratzesberger

You can bind a constraint attribute to your model with the matches()  
function

<xforms:bind nodeset="/pathtonode" constraint="matches( ., '[0-9A-Za-
z/\-]' )"/>

HTH,
Hank

On Apr 8, 2008, at 2:24 AM, Reddy, Gopikrishna wrote:

> Hi Can anybody please help me in this,
>
> I Have an input field i need to restrict in the way it should  
> accept only following things
> only 2 special characters / and -
> numbers 0-9
> alphabets A-Z and a-z
>
>
>
>
> Thanks in advance,
> 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.
>
> --
> 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
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
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
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE:INPUT FIELD ACCEPT ONLY TWO SPECIAL CHARACTERS / AND - AND NUMBERS 0-9 AND ALPHABETS A-Z AND a-z

Reddy, Gopikrishna
 
Hi Thanks for the help I tried this code but it validates only the first value entered matches checks with only the first value enetered but it does nt check the other values,Can any body please help me in this as this is very urgent tome.
 
 
Thanks in advance,
K Gopirkishna Reddy

________________________________

From: Hank Ratzesberger [mailto:[hidden email]]
Sent: Tue 4/8/2008 9:43 PM
To: [hidden email]
Subject: [ops-users] Re: RE:INPUT FIELD ACCEPT ONLY TWO SPECIAL CHARACTERS / AND - AND NUMBERS 0-9 AND ALPHABETS A-Z AND a-z




You can bind a constraint attribute to your model with the matches()
function

<xforms:bind nodeset="/pathtonode" constraint="matches( ., '[0-9A-Za-
z/\-]' )"/>

HTH,
Hank

On Apr 8, 2008, at 2:24 AM, Reddy, Gopikrishna wrote:

> Hi Can anybody please help me in this,
>
> I Have an input field i need to restrict in the way it should
> accept only following things
> only 2 special characters / and -
> numbers 0-9
> alphabets A-Z and a-z
>
>
>
>
> Thanks in advance,
> 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.
>
> --
> 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
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042








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.


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

winmail.dat (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: RE:INPUT FIELD ACCEPT ONLY TWO SPECIAL CHARACTERS / AND - AND NUMBERS 0-9 AND ALPHABETS A-Z AND a-z

fl.schmitt(ops-users)
Hi,

Reddy, Gopikrishna schrieb:

> I tried this code but it validates only the first value entered
> matches checks with only the first value enetered but it does nt
> check the other values,Can any body please help me in this as this is
>  very urgent tome.

I suppose you will have to modify the RegEx so there are no other
characters allowed before or after the match:

<xforms:bind
     nodeset="/pathtonode"
     constraint="matches( ., '^[0-9A-Za-z/\-]*$' )"/>

With this RegEx, also an empty content should be valid (zero or more
valid characters). With '^[0-9A-Za-z/\-]+$', at least one character is
required to make the element content valid.

HTH
florian




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