I thought we were trimming textfield strings, but now i see it's no
longer the case. Is it a regression or a feature?

Also the missing message doesn't make much sense, can you please
report a JIRA issue and attach a quick start project?

-Matej

On 9/6/07, Alex Objelean <[EMAIL PROTECTED]> wrote:
>
> 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:
>
>
>
> >       public final void validate()
> >       {
> >               validateRequired();
> >               if (isValid())
> >               {
> >                       convertInput();
> >
> >                       if (isValid() && isRequired() && getConvertedInput() 
> > == null &&
> > isInputNullable())
> >                       {
> >                               reportRequiredError();
> >                       }
> >                         /*isn't something like this missing here?*/ if
> > (!isValid()) { /*report Conversion error*/ }
> >                       if (isValid())
> >                       {
> >                               validateValidators();
> >                       }
> >               }
> >       }
> >
>
> Any thoughts?
>
> Thank you!
> Alex.
> --
> View this message in context: 
> http://www.nabble.com/Wicket-validation-flaw--tf4390183.html#a12517215
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to