[ 
https://issues.apache.org/jira/browse/WICKET-934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525921
 ] 

Kent Tong commented on WICKET-934:
----------------------------------

For 1), getInput() is indeed not trimming the nput.

For 2), it does report the error:

                        final IConverter converter = getConverter(getType());
                        try
                        {
                                convertedInput = 
converter.convertToObject(getInput(), getLocale());
                        }
                        catch (ConversionException e)
                        {
                                ValidationError error = new ValidationError();
                                if (e.getResourceKey() != null)
                                {
                                        error.addMessageKey(e.getResourceKey());
                                }
                                ...
                        }


> textfield strings are not trimmed when performing validation (conversion).
> --------------------------------------------------------------------------
>
>                 Key: WICKET-934
>                 URL: https://issues.apache.org/jira/browse/WICKET-934
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta3
>            Reporter: Alexandru Objelean
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>         Attachments: mylyn-context.zip
>
>
> I've discovered the following issue:
> When using a DateTextField in a form (with the format: dd/MM/yyyy), user by 
> mistake add an extra space (for instance: "06/09/2007 ") and submit the form. 
> The are two problems:
> 1) I would expect the convertor to convert this value correct, but the 
> AbstractConverter.parse method throws a ConversionException because: 
> (position.getIndex() != stringValue.length()).
> 2) The above exception is not reported anywhere, because validate method does 
> not check if the input is valid after converting its value: 
> Forum link: 
> "http://www.nabble.com/Re%3A-Wicket-validation-flaw--p12519433.html";

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to