wood burning stoves 2.0*
The moose likes Struts and the fly likes struts2: howto avoid validation even if the input is inconsistent with the data type? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts2: howto avoid validation even if the input is inconsistent with the data type?" Watch "struts2: howto avoid validation even if the input is inconsistent with the data type?" New topic
Author

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

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
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

Joined: Dec 14, 2004
Posts: 194
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

Joined: Sep 10, 2004
Posts: 755
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts2: howto avoid validation even if the input is inconsistent with the data type?
 
Similar Threads
Data validation - Best practice - at what level
Why to use DTD if the schema is more flexible/powerful?
need for Encapsulation ?
limit to multiples of 5
Validation - Best Practice.