We are binding a text input field to a property of type Long on our command class. We have a Validator which checks that the user's input is a valid number format, but in the case the user enters non-digit characters, these validations are never reached. Instead, the CustomNumberEditor throws a NumberFormatException and the user gets the following error message in the jsp:
Is there any way to customize this error message? Thanks.Code:Failed to convert property value of type [java.lang.String] to required type [java.lang.Long] for property 'quantity'; nested exception is java.lang.NumberFormatException: For input string: "dfkjd"
-karl


Reply With Quote