File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts2: howto avoid validation even if the input is inconsistent with the data type?

 
Peter Primrose
Ranch Hand
Posts: 755
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there a way to avoid validation even if the user input is incorrect?

example:

Integer age;

the user is requested to provide his age and he enters ABCD

how can I make sure that the action will kick in despite the field being incorrect?

thanks
 
Eric Nielsen
Ranch Hand
Posts: 194
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to understand why you want this... If you don't want the field validated at all, just remove the validation?

If you want the field validated normally, but don't when it fails type coversion.... that just seems od and I can't picture the use case.... Perhaps if you explained why, someone could figure out a good approach?
 
Peter Primrose
Ranch Hand
Posts: 755
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a field Double and if the user input a String value - I get a blank error and the update is not executed.

so how can I tell what's the user's input for a Double field?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic