Another question - validating user input in fields
Hi, I have another question for you guys. Say, a user types an input into the form, but with my checkings, I made that kind of input, say "$%#RG", invalid. But I would like to write a line at the side of the form saying "input must be from A-Z or a-z". I think in asp, its called text validators or something. How do you do that in JSP? From, Anson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : Another question - validating user input in fields
Hi, If you want to do it on the client-side, you will need JavaScript to check what the user typed, and then "alert" some message to tell him that his entries are wrong. On the server-side, you can use the request.getParameter("myParam") to check what the user typed, then send the appropriate response to the client. Hope it helps. Alain -Message d'origine- De : Anson Zeall [mailto:[EMAIL PROTECTED] Envoyé : mardi, 9. septembre 2003 12:07 À : Tomcat Users List Objet : Another question - validating user input in fields Hi, I have another question for you guys. Say, a user types an input into the form, but with my checkings, I made that kind of input, say "$%#RG", invalid. But I would like to write a line at the side of the form saying "input must be from A-Z or a-z". I think in asp, its called text validators or something. How do you do that in JSP? From, Anson ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Another question - validating user input in fields
You could try here: http://jakarta.apache.org/commons/validator/ Barry -Original Message- From: Anson Zeall [mailto:[EMAIL PROTECTED] Sent: 09 September 2003 11:07 To: Tomcat Users List Subject: Another question - validating user input in fields Hi, I have another question for you guys. Say, a user types an input into the form, but with my checkings, I made that kind of input, say "$%#RG", invalid. But I would like to write a line at the side of the form saying "input must be from A-Z or a-z". I think in asp, its called text validators or something. How do you do that in JSP? From, Anson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another question - validating user input in fields
You'll have to handle it yourself. You could do it server-side or client-side with Javascript and DHTML. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another question - validating user input in fields
Well, if you use Struts, you can use the Validator framework. Everything is almost automatic, with no coding required. Marco - Original Message - From: "Anson Zeall" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, September 09, 2003 11:06 AM Subject: Another question - validating user input in fields > Hi, > > I have another question for you guys. Say, a user types an input into > the form, but with my checkings, I made that kind of input, say "$%#RG", > invalid. But I would like to write a line at the side of the form saying > "input must be from A-Z or a-z". I think in asp, its called text validators > or something. How do you do that in JSP? > > From, > > Anson > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]