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]