struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henrique VIECILI" <>
Subject Re: validate numeric
Date Thu, 20 May 2004 13:58:47 GMT
Hi Julia,

You can use javascript and/or server-side validation:


isNaN(field.value); //verify if the value 'is not a number'

server side: (there are many ways)

try {
} catch (NumberFormatException nfe) {
    // if this exception is thrown the value of the field is not a number

Henrique Andrade Viecili
  ----- Original Message ----- 
  From: Julia Weaver 
  To: Struts Users Mailing List ; 
  Sent: Thursday, May 20, 2004 9:56 AM
  Subject: validate numeric


  How can I validate the field user input in form bean
  is not a numeric value? Is any function exist like: 


  Do you Yahoo!?
  Yahoo! Domains - Claim yours for only $14.70/year 

  To unsubscribe, e-mail:
  For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message