On the server-side, use an expression validator to ensure the input
contains only valid characters.
On the client-side either:
- use ajax validation; or
- use a javascript function that listens for the keypress event and
rejects invalid keystrokes
As usual, the javascript keypress event on
Thank you very much Jeromy ,
It works I used the java Scripts for this to validate in client side.
sanjeewa
-Original Message-
From: Jeromy Evans [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 27, 2008 1:44 PM
To: Struts Users Mailing List
Subject: Re: Restric the values
Sanjeewa Saman wrote:
Thank you very much Jeromy ,
It works I used the java Scripts for this to validate in client side.
You're welcome. Depending on how important the data is and how public
the site is, also consider validating it on the server-side in case of
users without javascript
Hi all ,
Can some body please tell me a way to restrict the data that we can eneter
to a textfield in struts2.
What I wanted to do is , for the s:textfield , I need to enter only values
these values {1-10 , +,-,.} .
Thank you.
sanjeewa
:29 PM
To: Struts Users Mailing List
Subject: Re: Restric the values in S:TextFields.
On Tue, Feb 26, 2008 at 10:49 PM, Sanjeewa Saman [EMAIL PROTECTED]
wrote:
Hi all ,
Can some body please tell me a way to restrict the data that we can
eneter
to a textfield in struts2.
What I wanted to do
On Tue, Feb 26, 2008 at 10:49 PM, Sanjeewa Saman [EMAIL PROTECTED] wrote:
Hi all ,
Can some body please tell me a way to restrict the data that we can eneter
to a textfield in struts2.
What I wanted to do is , for the s:textfield , I need to enter only values
these values {1-10 , +,-,.}
Chris Pratt wrote:
On Tue, Feb 26, 2008 at 10:49 PM, Sanjeewa Saman [EMAIL PROTECTED] wrote:
Hi all ,
Can some body please tell me a way to restrict the data that we can eneter
to a textfield in struts2.
What I wanted to do is , for the s:textfield , I need to enter only values
these
7 matches
Mail list logo