DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11050>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11050 No way to properly validate form properties of types other than String Summary: No way to properly validate form properties of types other than String Product: Struts Version: Nightly Build Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Validator Framework AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I'm not sure if it was supposed to be that way, but currently validating form properties other than of String types does not work as expected. Suppose we have a form with Integer field. If user does not enter anything in this field and submits, then this field will get a default values of 0 because this is default behaviour of IntegerConverter class. So this field will pass "requried" validation, and will get value of zero wothout user knowing anything, which is completely wrong! The same issue will arise if user enters invalid integer. Instead of error message saying that this is not a valid integer, a default zero value will be silentely submitted. Even if we change IntegerConverter's behaviour to return null instead of zero for invalid Integers, we still don't get expected from validation logic! Although, requried works, checking for valid integer value does not even gets in place, because requried fails after IntegerConvertes returns null since it cannot parse invalid Integer value. This issue is easy to reproduce - just change form field type from String to Integer in struts-validation sample app. Is there a good workaround anyone can suggest? -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>